Re: Per-function search_path => per-function GUC settings

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Per-function search_path => per-function GUC settings
Дата
Msg-id 24343.1188673394@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Per-function search_path => per-function GUC settings  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: Per-function search_path => per-function GUC settings  ("Josh Tolley" <eggyknap@gmail.com>)
Re: Per-function search_path => per-function GUC settings  (Decibel! <decibel@decibel.org>)
Re: Per-function search_path => per-function GUC settings  ("Marko Kreen" <markokr@gmail.com>)
Re: Per-function search_path => per-function GUC settings  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
Jeff Davis <pgsql@j-davis.com> writes:
> Can we also provide syntax which would be equivalent to setting "var"
> for the function to be whatever the current value happens to be when the
> ALTER FUNCTION is run? Possible syntax might be something like:

> ALTER FUNCTION func(args) SET var TO CURRENT;

Hmmm ... that's certainly do-able, though I'm not sure how much it helps
the use-case you suggest.  The search path still has to be set at the
top of the module script, no?

However, I like an explicit option of this sort a lot better than the
automatic version Greg was suggesting ... I'm willing to do it if people
want it.

One problem is that we'd have to make CURRENT a reserved word to make it
work exactly like that.  Can anyone think of a variant syntax that
doesn't need a new reserved word?
        regards, tom lane


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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Per-function search_path => per-function GUC settings
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Per-function search_path => per-function GUC settings