pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Brusser <michael@synchronicity.com>
To: pgsql-sql@postgresql.org
Subject: How to determine the current user
Date: Tue, 14 Oct 2003 14:05:53 -0400
Message-ID: <DEEIJKLFNJGBEMBLBAHCAEKCDMAA.michael@synchronicity.com> (raw)

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.






view thread (2+ messages)  latest in thread

Message-ID: <DEEIJKLFNJGBEMBLBAHCAEKCDMAA.michael@synchronicity.com>
Permalink:  ../DEEIJKLFNJGBEMBLBAHCAEKCDMAA.michael@synchronicity.com/
Also on:    postgresql.org/message-id/DEEIJKLFNJGBEMBLBAHCAEKCDMAA.michael@synchronicity.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: michael@synchronicity.com
  Subject: Re: How to determine the current user
  In-Reply-To: <DEEIJKLFNJGBEMBLBAHCAEKCDMAA.michael@synchronicity.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox