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

From Tom Lane
Subject Re: non superuser creating flat files
Date
Msg-id 5996.1187016611@sss.pgh.pa.us
Whole thread Raw
In response to non superuser creating flat files  ("Terri Reid" <treid@bct-solutions.co.uk>)
Responses Re: non superuser creating flat files
Re: non superuser creating flat files
List pgsql-general
"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.

            regards, tom lane

pgsql-general by date:

Previous
From: Erik Jones
Date:
Subject: Re: Persistent connections in PHP
Next
From: Josh Trutwin
Date:
Subject: Re: Persistent connections in PHP