Re: Permissions within a function

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Permissions within a function
Дата
Msg-id 2714.1103392746@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Permissions within a function  (Thomas Hallgren <thhal@mailblocks.com>)
Ответы Re: Permissions within a function  (Thomas Hallgren <thhal@mailblocks.com>)
Список pgsql-hackers
Thomas Hallgren <thhal@mailblocks.com> writes:
> Peter Eisentraut wrote:
>> You can use GetUserId() and SetUserId() to flip the current user 
>> identity around as you like.  For such a simple query, however, it 
>> might seem better to bypass SPI altogether and do a straight table 
>> lookup through lower-level functions.
>> 
> Brilliant! I had no idea it was that simple.

Well, it's not.  Exactly what are you going to flip it *to*?  You can't
hardwire a particular userid and expect to have a robust solution.

I'd recommend the lower-level approach myself.
        regards, tom lane


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: double error msg [ 8.0 rc1 ]
Следующее
От: Thomas Hallgren
Дата:
Сообщение: Re: Permissions within a function