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

From Terri Reid
Subject Re: non superuser creating flat files
Date
Msg-id 004101c7ddba$7df67d70$800101df@TERRILAPTOP
Whole thread Raw
In response to Re: non superuser creating flat files  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Tom,

Thank you very much, that works now.

Terri Reid
01925 732359


-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: 13 August 2007 15:50
To: Terri Reid
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] non superuser creating flat files

"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: "Terri Reid"
Date:
Subject: Non-superuser creating a flat file
Next
From: "Gilbert Albero"
Date:
Subject: Windows XP installation problem