From: | Juan Miguel <juanmime(at)ono(dot)com> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | macdickson <mfernandes(at)phildigital(dot)com>, pgsql-admin(at)postgresql(dot)org |
Subject: | Re: How to store jpeg files in Postgres Database |
Date: | 2004-10-19 17:51:45 |
Message-ID: | 41755431.4050408@ono.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-admin |
Peter Eisentraut wrote:
>Am Freitag, 15. Oktober 2004 08:37 schrieb macdickson:
>
>
>>Can any one tell me how to store jpegh files in Postgres Database
>>
>>
>
>Use the data type "bytea".
>
>
>
First, Sorry about my english.
I use the "lo" type (see contrib folder). This is similar to oid type,
but helps you managing the deletion of a record. For example, when you
delete a record where a column contains a OID reference, postgres does
not delete de large object referenced. If the type of a column is lo,
you could create a trigger that perform the function lo_manage given by
the library of "lo", that automaticaly delete the large object. In this
case, the column only stores the object identifier (imagine an integer),
instead of the full image like a bytea column.
¿ Why I use "lo" or "oid" ? Because when you connect to a database via
ODBC, the "lo" or "oid" column's type is recognized like a "blob field",
then I can link this field with grids or other controls that show the
content (a JPG image for example).
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Sullivan | 2004-10-19 17:58:23 | Re: NIC to NIC connection |
Previous Message | Jay A. Kreibich | 2004-10-19 17:18:57 | Re: NIC to NIC connection |