Search Postgresql Archives

plperlu Question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/



---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux