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

From Brent Wood
Subject Re: To store and retrive image data in postgresql
Date
Msg-id 487367B20200007B00013EE5@gwia1.ham.niwa.co.nz
Whole thread Raw
In response to To store and retrive image data in postgresql  (aravind chandu <avin_friends@yahoo.com>)
Responses Re: To store and retrive image data in postgresql
List pgsql-general
>>> aravind chandu <avin_friends@yahoo.com> 07/08/08 10:30 AM >>>
Hello,

          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?



Hi,

I have been involved in building a few applications to manage this capability. In the 3 cases to date, we store the
infoabout the image in the database, including the name/path/URL to the image, and have an application retrieve the
imagefor us from this data. We have not (yet) found any added value in storing the image itself as a binary object in
thedatabase. Images are stored as files on the system. 

One (relatively) easy way to demonstrate this is using QGIS. This is able to display data stored in PostGIS tables
(PostGISadds spatial support to Postgres, so we can store a point location with an image name/path). We can plot a map
inQGIS showing the points representing photographs, and via the "action" capability in QGIS, we can create a command to
clickan image on the map & display it, retrieving the path & name from the database in order to do so.  

One PostGIS/ImageJ application we are working on does store ImageJ ROI files as binary objects in the database, but the
imagesthey are derived from is still stored outside the database as a file, with the path/name stored as database
fieldsas a pointer to the image. 

HTH,

  Brent Wood


pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: [pg_gen] what was the "issue" with the 8.3.2 bundle ?
Next
From: spellberg_robert
Date:
Subject: Re: [pg_gen] what was the "issue" with the 8.3.2 bundle ?