is it possible to get current_user inside security definer function ?

From: "Boris Migo" <migo(at)intrak(dot)sk>
To: <pgsql-general(at)postgresql(dot)org>
Subject: is it possible to get current_user inside security definer function ?
Date: 2006-03-06 17:27:06
Message-ID: 000801c64143$313bba50$1e01a8c0@weasel
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Is there any way to get the name of the current user inside a plpgsql function that is defined with security definer?

I know that this question was discused earlier, and session_user should be the answer, but user's curren_user doesn't have to be the same as session_user before function call, because of 'set role'.

regards
justweasel

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrus 2006-03-06 17:32:30 Re: Using same database from XP and Linux in notebook
Previous Message Florian G. Pflug 2006-03-06 17:17:23 Re: [OFFTOPIC] Typo3 + Postgresql anyone?