Search Postgresql Archives

Re: Exporting a PDF from a bytea column

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/18/2016 4:44 PM, CS DBA wrote:
The system stores PDF's as large objects
in bytea columns.

Large Objects aka LO's and bytea columns are two completely different things.

bytea columns are regular SQL database columns that contain a binary byte array. large objects (LO) are a whole separate facility, where each object is referenced by a unique OID, and the object is read and written with the lo_XXX() functions in libpq, or equivalents in other language specific bindings.
http://www.postgresql.org/docs/current/static/largeobjects.html

in a C program, an LO can be exported to a file via the API lo_export()
http://www.postgresql.org/docs/current/static/lo-interfaces.html#LO-EXPORT


Can anyone send me an example of
exporting from a bytea column to a PDF file?

I don't think you can get from a bytea field to a file without some coding, as SQL scripting doesn't handle binary blobs very well.

--
john r pierce, recycling bits in santa cruz



--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux