Re: How to store jpeg files in Postgres Database
От | Juan Miguel |
---|---|
Тема | Re: How to store jpeg files in Postgres Database |
Дата | |
Msg-id | 41755431.4050408@ono.com обсуждение исходный текст |
Ответ на | Re: How to store jpeg files in Postgres Database (Peter Eisentraut <peter_e@gmx.net>) |
Список | 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 по дате отправления: