Can the username calling a function be made available within the function?

From: Adam Witney <awitney(at)sghms(dot)ac(dot)uk>
To: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Can the username calling a function be made available within the function?
Date: 2004-04-07 10:23:25
Message-ID: BC99952D.30C17%awitney@sghms.ac.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


I'd like to be able to have a PL/pgSQL function defined as SECURITY DEFINER,
but still have access to the calling username within the function. Is this
possible?

I could pass current_user as a parameter, but of course this could easily be
bypassed.

Is there a way of coding this?

Thanks for any help

Adam

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jan Wieck 2004-04-07 11:51:11 Re: Cursors and Transactions, why?
Previous Message Hervé Piedvache 2004-04-07 09:51:48 How estimated rows is running ?