Re: How to store jpeg files in Postgres Database - Mailing list pgsql-admin

From Juan Miguel
Subject Re: How to store jpeg files in Postgres Database
Date
Msg-id 41755431.4050408@ono.com
Whole thread Raw
In response to Re: How to store jpeg files in Postgres Database  (Peter Eisentraut <peter_e@gmx.net>)
List 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).

pgsql-admin by date:

Previous
From: "Jay A. Kreibich"
Date:
Subject: Re: NIC to NIC connection
Next
From: Andrew Sullivan
Date:
Subject: Re: NIC to NIC connection