Re: Importing blob - Mailing list pgsql-general

From Patrick Nelson
Subject Re: Importing blob
Date
Msg-id 4165C48DE9A0D211B6400800095C585F172DF6@WASHINGTON
Whole thread Raw
In response to Importing blob  (Patrick Nelson <pnelson@neatech.com>)
Responses Re: Importing blob
List pgsql-general
Patrick Nelson wrote:
----------------->>>>
Here is my table:

 CREATE TABLE setimg (id serial, setid int8, image OID);

Here is my insert:

 INSERT INTO setimg(setid, image) VALUES ('32334', lo_import('32334.jpg'));

And the error:

 lo_import: can't open unix file "32334.jpg": no such file or directory

I have tried everything that I can think of to insert this file and every
time I get the same error.  I have set the full path to the file.  I have
change priv to 666.  Confirmed proper ownership <user>:<user>.  And still it
does not see it.  What am I doing wrong?
----------------->>>>

Oopss!

RH73 with psql 7.2.1 as the client
RH72 running 7.1.3 as the server

If I add the entire path in the lo_import function then I get the following
error:

 lo_import: can't open unix file "32334.jpg": Permission denied

The file has 666 as it's permissions and I've tried all sorts of ownership
configs.  Still denied.  I just must be doing something wrong here.

pgsql-general by date:

Previous
From: Patrick Nelson
Date:
Subject: Importing blob
Next
From: Alexander Pucher
Date:
Subject: Re: MySQL or Postgres ?