Re: To store and retrive image data in postgresql - Mailing list pgsql-general

From Christophe
Subject Re: To store and retrive image data in postgresql
Date
Msg-id E9198697-7CB6-46CD-ABE2-92E9A1AED0C0@thebuild.com
Whole thread Raw
In response to To store and retrive image data in postgresql  (aravind chandu <avin_friends@yahoo.com>)
List pgsql-general
On Jul 7, 2008, at 12:22 PM, aravind chandu wrote:
>          I need to store an image in postgresql database and after
> that i need to retrive the image back.Can you please help me how to
> do this?

Assuming you mean an image as in a binary visual image (like a JPEG),
the data type you want is BYTEA. How to actually get BYTEA data into
and out of PostgreSQL depends on what client library and language you
are using.

If your application allows it, it is often far more efficient to
store a reference to the image in the database (such as a URI or file
path), rather than the image itself.

pgsql-general by date:

Previous
From: Lennin Caro
Date:
Subject: Re: To store and retrive image data in postgresql
Next
From: Keaton Adams
Date:
Subject: Query running slow but was running fine before