Re: change current user in pl/pgsql function

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: change current user in pl/pgsql function
Дата
Msg-id 20060206143250.GA31046@wolff.to
обсуждение исходный текст
Ответ на change current user in pl/pgsql function  (Sergey Karin <sergey.karin@gmail.com>)
Список pgsql-general
On Mon, Feb 06, 2006 at 15:43:30 +0300,
  Sergey Karin <sergey.karin@gmail.com> wrote:
> Hi, List!
>
> I use PG8.1
>
> Are there any abilities to change current user during pl/pgsql function
> execution?
> I developed function that have 'security definer' option and created under
> superuser. But for executing some command in the function I need to change
> user to session_user and after execotion change user to superuser.

You can probably do what you want by having the top level function
run with the caller's security and have it call security definer functions
as necessary.

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

Предыдущее
От: indu ss
Дата:
Сообщение: Compile of Pgmail function fails
Следующее
От: Hrishikesh Deshmukh
Дата:
Сообщение: Question