| От | 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
|
| Список | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера