plperlu Question - Mailing list pgsql-general

From jbduffy@tiscali.co.uk
Subject plperlu Question
Date
Msg-id 4366F1C90005E95F@mk-cpfrontend-1.mail.uk.tiscali.com
Whole thread Raw
Responses Re: plperlu Question
List 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 by date:

Previous
From: Richard_D_Levine@raytheon.com
Date:
Subject: Re: Rebranding PostgreSQL
Next
From: Byrne Kevin-kbyrne01
Date:
Subject: Anomalies with the now() function