Re: Use PSQLFS for photo storage - Mailing list pgsql-general

From Jason Long
Subject Re: Use PSQLFS for photo storage
Date
Msg-id 496E40B1.2060209@supernovasoftware.com
Whole thread Raw
In response to Re: Use PSQLFS for photo storage  (Reid Thompson <reid.thompson@ateb.com>)
List pgsql-general
Reid Thompson wrote:
On Tue, 2009-01-13 at 18:22 -0600, Jason Long wrote: 
Never used Python or Perl.  I use primarily Java.  I was thinking of
doing something like
INSERT INTO pictures (filename,data) VALUES ('filename','/path/to/my/image/img0009.jpg');

But, this syntax doesn't seem to be supported.

Maybe I can use a custom C function to get the contents of the file.  Then do something like

INSERT INTO pictures (filename,data) VALUES ('/path/to/my/image/img0009.jpg',getBinaryFileContents('/path/to/my/image/img0009.jpg'));

Is there some postgres contrib for something like this?



   
Simple java stub test program attached.  Modify to meet your needs.  See
file header for URL of original example. 
Thanks for the sample.  I will be using Hibernate with will make my code much cleaner.  I will post an example here when done.  I never use straight JDBC.

pgsql-general by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Odd duplicate database
Next
From: Alvaro Herrera
Date:
Subject: Re: Odd duplicate database