Re: non superuser creating flat files - Mailing list pgsql-general

From Erik Jones
Subject Re: non superuser creating flat files
Date
Msg-id 60D5B120-CFF3-4411-9501-D2404A49E084@myemma.com
Whole thread Raw
In response to Re: non superuser creating flat files  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: non superuser creating flat files
List pgsql-general
On Aug 13, 2007, at 9:50 AM, Tom Lane wrote:

> "Terri Reid" <treid@bct-solutions.co.uk> writes:
>> I have data that is being updated in a table that I need to export
>> to a flat
>> file via a database trigger on insert or update. The user
>> performing the
>> update will not be a superuser. I've tried to use COPY TO, but
>> that doesn't
>> work for non-superusers.
>
> It will if invoked in a trigger function that's marked SECURITY
> DEFINER
> and owned by a superuser.

Also/Or, make sure the that the correct filesystem write permissions
are set on the file/directory to which you're writing for which ever
user whose permissions the trigger function is executed as.

Erik Jones

Software Developer | Emma®
erik@myemma.com
800.595.4401 or 615.292.5888
615.292.0777 (fax)

Emma helps organizations everywhere communicate & market in style.
Visit us online at http://www.myemma.com



pgsql-general by date:

Previous
From: Josh Trutwin
Date:
Subject: Re: Persistent connections in PHP
Next
From: "Lim Berger"
Date:
Subject: Re: "Out of memory" errors..