Re: [GENERAL] lo_import() problem
От | Peter T Mount |
---|---|
Тема | Re: [GENERAL] lo_import() problem |
Дата | |
Msg-id | Pine.LNX.3.96.980804183651.7573I-100000@maidast.retep.org.uk обсуждение исходный текст |
Ответ на | lo_import() problem ("Robert Nosko" <robertn@eori.net.pl>) |
Список | pgsql-general |
On Mon, 3 Aug 1998, Robert Nosko wrote: > Hi, > > I have a problem with built-in lo_import() function. > I want to store some images in my database, so I'm doing this: > > create table image(name varchar, id oid); > > Next, I want to import an image '1.jpg', which resides in '/home/username/postgres/images': > > INSERT INTO image (name,id) VALUES('foo',lo_import('/home/username/postgres/images/1.jpg')); > > I'm receiving something like this: > ERROR: be_lo_import - 'can't open unix file' > > Why? I have full rights to database and graphics files in > '/home/username/postgres/images/'. > So, what's going on? lo_import runs under the same userid as the postmaster (normally postgres). If that user hasn't got access, then it will fail. -- Peter T Mount peter@retep.org.uk or petermount@earthling.net Main Homepage: http://www.retep.org.uk PostgreSQL JDBC Faq: http://www.retep.org.uk/postgres
В списке pgsql-general по дате отправления: