Re: Triggers with DO functionality - Mailing list pgsql-hackers

From Christopher Browne
Subject Re: Triggers with DO functionality
Date
Msg-id CAFNqd5Wwt78X46UB7pj7snNBxayhvXqhyG5xM9QF__-+AP2NSw@mail.gmail.com
Whole thread Raw
In response to Re: Triggers with DO functionality  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-hackers
On Fri, Feb 24, 2012 at 2:55 PM, Kevin Grittner
<Kevin.Grittner@wicourts.gov> wrote:
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
>> By default, a trigger function runs as the table owner, ie it's
> implicitly SEC DEF
>> to the table owner.
>
> Really?  That's certainly what I would *want*, but it's not what I've
> seen.

Yeah, not quite consistent with what I've seen.

And it's not obvious that it truly is what you want.  An audit trigger
would need to run as the *audit table* owner, which might not be the
same as the user that owns the table on which the trigger fires.
--
When confronted by a difficult problem, solve it by reducing it to the
question, "How would the Lone Ranger handle this?"


pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: Triggers with DO functionality
Next
From: Simon Riggs
Date:
Subject: COPY with hints, rebirth