Re: How to find out who is calling the function - Mailing list pgsql-general

From Greg Stark
Subject Re: How to find out who is calling the function
Date
Msg-id 87d64dzjyr.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: How to find out who is calling the function  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Tom Lane <tgl@sss.pgh.pa.us> writes:

> "BARTKO Zoltan" <bartko.zoltan@pobox.sk> writes:
> > caller() is the function I am looking for.
>
> The closest thing you will find is SESSION_USER.

I think you can have to have a trigger that compared session_user with the
value of the column in OLD and blocked the update/delete if it doesn't match.

--
greg

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: pg_class could not be found
Next
From: Adrian Klaver
Date:
Subject: Re: How can I delete a primary or foreign key?