pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
How to store jpeg files in Postgres Database
3+ messages / 3 participants
[nested] [flat]

* How to store jpeg files in Postgres Database
@ 2004-10-15 06:37 macdickson <mfernandes@phildigital.com>
  2004-10-15 16:25 ` Re: How to store jpeg files in Postgres Database Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 1 reply; 3+ messages in thread

From: macdickson @ 2004-10-15 06:37 UTC (permalink / raw)
  To: pgsql-admin


Can any one tell me how to store jpegh files in Postgres Database

bye

Macdickson

-- 
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: How to store jpeg files in Postgres Database
  2004-10-15 06:37 How to store jpeg files in Postgres Database macdickson <mfernandes@phildigital.com>
@ 2004-10-15 16:25 ` Peter Eisentraut <peter_e@gmx.net>
  2004-10-19 17:51   ` Re: How to store jpeg files in Postgres Database Juan Miguel <juanmime@ono.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Peter Eisentraut @ 2004-10-15 16:25 UTC (permalink / raw)
  To: macdickson <mfernandes@phildigital.com>; +Cc: pgsql-admin

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".

-- 
Peter Eisentraut
http://developer.postgresql.org/~petere/



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: How to store jpeg files in Postgres Database
  2004-10-15 06:37 How to store jpeg files in Postgres Database macdickson <mfernandes@phildigital.com>
  2004-10-15 16:25 ` Re: How to store jpeg files in Postgres Database Peter Eisentraut <peter_e@gmx.net>
@ 2004-10-19 17:51   ` Juan Miguel <juanmime@ono.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Juan Miguel @ 2004-10-19 17:51 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: macdickson <mfernandes@phildigital.com>; 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).



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2004-10-19 17:51 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-10-15 06:37 How to store jpeg files in Postgres Database macdickson <mfernandes@phildigital.com>
2004-10-15 16:25 ` Peter Eisentraut <peter_e@gmx.net>
2004-10-19 17:51   ` Juan Miguel <juanmime@ono.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox