plperlu Question

From: jbduffy(at)tiscali(dot)co(dot)uk
To: pgsql-general(at)postgresql(dot)org
Subject: plperlu Question
Date: 2005-11-17 09:35:07
Message-ID: 4366F1C90005E95F@mk-cpfrontend-1.mail.uk.tiscali.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Csaba Nagy 2005-11-17 09:41:59 Re: locked backend
Previous Message Magnus Hagander 2005-11-17 09:00:54 Re: Does PG Support Unicode on Windows?