How to determine the current user

From: Michael Brusser <michael(at)synchronicity(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: How to determine the current user
Date: 2003-10-14 18:05:53
Message-ID: DEEIJKLFNJGBEMBLBAHCAEKCDMAA.michael@synchronicity.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

I'm running Pg v7.3.4
I have a function where I need to determine the current user.
But since the function was created with option "SECURITY DEFINER"
(it has to be this way) current_user returns the name of creator,
rather than current user.

Is there a way in such function find out the real current user?

Thanks,
Mike.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Eisentraut 2003-10-14 18:13:11 Re: security definer function
Previous Message Joe Conway 2003-10-14 17:45:59 Re: Oracle 'connect by prior' now eaiser in 7.3?