Re: Questions regarding SET option.

Поиск
Список
Период
Сортировка
От Jignesh Shah
Тема Re: Questions regarding SET option.
Дата
Msg-id c11950271002220952g72b15039td5c8fdfe121c8ed3@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Questions regarding SET option.  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
Ответы Re: Questions regarding SET option.  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-general
Thanks a ton Laurenz and Pavel for your responses but I really didn't follow you. I am not master in PostGreSQL yet. Could you please give me some example?

Basically, I want to know how many such SET options I should reset before executing my function and at the end it should also be restored to original settings.

It would be really helpful if you could elaborate your response.

Thanks guys.
Jack

On Mon, Feb 22, 2010 at 8:05 PM, Albe Laurenz <laurenz.albe@wien.gv.at> wrote:
Jignesh Shah wrote:
> I have been writing a function with SECURITY DEFINER enabled.
> Basically, I am looking for ways to override the users SET
> option settings while executing my function to prevent the
> permissions breach. For example, to override "SET
> search_path", I am setting search path in my function before
> executing anything. Could any one please tell me what could
> be other SET options that I should take care?
>
> Moreover, how to revert back those settings just before
> returning from my function?

You can use the SET clause of CREATE FUNCTION which does exactly
what you want.

Yours,
Laurenz Albe

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

Предыдущее
От: Yang Zhang
Дата:
Сообщение: Re: Performance cost of a sort-merge join
Следующее
От: Scott Bailey
Дата:
Сообщение: Re: What is unsecure postgres languages? How to disable them?