Re: non superuser creating flat files

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Terri Reid" <treid(at)bct-solutions(dot)co(dot)uk>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: non superuser creating flat files
Date: 2007-08-13 14:50:11
Message-ID: 5996.1187016611@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Terri Reid" <treid(at)bct-solutions(dot)co(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Josh Trutwin 2007-08-13 14:55:22 Re: Persistent connections in PHP
Previous Message Erik Jones 2007-08-13 14:44:26 Re: Persistent connections in PHP