From: | John R Pierce <pierce(at)hogranch(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Exporting a PDF from a bytea column |
Date: | 2016-02-19 02:20:10 |
Message-ID: | 56C67BDA.6060800@hogranch.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
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
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2016-02-19 02:29:30 | Re: Exporting a PDF from a bytea column |
Previous Message | Andreas Kretschmer | 2016-02-19 01:11:04 | Re: Live steraming replication setup issue! |