Re: How to find out who is calling the function

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to find out who is calling the function
Date: 2004-06-05 23:03:08
Message-ID: 87d64dzjyr.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> "BARTKO Zoltan" <bartko(dot)zoltan(at)pobox(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2004-06-05 23:32:03 Re: How can I delete a primary or foreign key?
Previous Message Jeff Davis 2004-06-05 22:30:34 Re: Why hash indexes suck