plperlu Question
От | jbduffy@tiscali.co.uk |
---|---|
Тема | plperlu Question |
Дата | |
Msg-id | 4366F1C90005E95F@mk-cpfrontend-1.mail.uk.tiscali.com обсуждение исходный текст |
Ответы |
Re: plperlu Question
|
Список | pgsql-general |
Hi I have a database 'testdatabase' which is owned by a non-superuser. I want to write a 'plperlu' function, 'import()', to process and import csv files into the database. I understand that as an un-trusted language 'plperlu' functions can only be created by a superuser, so my strategy has been as follows: su root su postgres psql -U postgres testdatabase ... \i my_plperlu_import_function.plperlu This works so far. My 'import()' function is created. However, when I run the function within psql, still as the postgres superuser, I get a 'permission denied' response to the perl 'open(DATA, "my_csv_file") within my 'import()' function. The csv file is world readable as I have moved it to /tmp and given the world 'rwx' permissions. Does my 'testdatabase' have to be owned by a superuser to run 'plperlu' functions? Is there an alternative strategy? Regards John Duffy ___________________________________________________________ Tiscali Broadband from 14.99 with free setup! http://www.tiscali.co.uk/products/broadband/
В списке pgsql-general по дате отправления: