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

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: Can the username calling a function be made available within the function?
Дата
Msg-id 200404071325.14808.dev@archonet.com
обсуждение исходный текст
Ответ на Can the username calling a function be made available within the function?  (Adam Witney <awitney@sghms.ac.uk>)
Список pgsql-general
On Wednesday 07 April 2004 11:23, Adam Witney wrote:
> 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?

Just "SELECT CURRENT_USER" into a variable. You might want SESSION_USER
though.


--
  Richard Huxton
  Archonet Ltd

В списке pgsql-general по дате отправления:

Предыдущее
От: Stephen Frost
Дата:
Сообщение: Re: More aggregate functions?
Следующее
От: Bob.Henkel@hartfordlife.com
Дата:
Сообщение: Re: Can we have time based triggers in Postgresql??