Re: Cascade delete triggers change user credentials - Mailing list pgsql-general

From Tom Lane
Subject Re: Cascade delete triggers change user credentials
Date
Msg-id 6213.1076986103@sss.pgh.pa.us
Whole thread Raw
In response to Re: Cascade delete triggers change user credentials  (Stephan Szabo <sszabo@megazone.bigpanda.com>)
Responses Re: Cascade delete triggers change user credentials
List pgsql-general
Stephan Szabo <sszabo@megazone.bigpanda.com> writes:
> On Mon, 16 Feb 2004, Antonios Christofides wrote:
>> ... this triggers a delete from "b", which in turn activates the
>> show_current_user trigger, the triggered function selects
>> "current_user", and the result is the user who created "b", not the
>> currently connected user.

> The triggered actions occur as if done by the owner of the fktable so that
> they will not fail if the current user does not actually have delete
> access on that table. I'm not sure which result for current_user makes
> more sense in that context for further triggered actions.

I don't think it's a bug.  I would suggest that Antonios probably really
wants to be using SESSION_USER, not CURRENT_USER.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Select for update, locks and transaction levels
Next
From: Brendan Jurd
Date:
Subject: psql, 7.4, and the \d command