Re: Function `set_config` doesn't work in with query?

Поиск
Список
Период
Сортировка
От Andrew Gierth
Тема Re: Function `set_config` doesn't work in with query?
Дата
Msg-id 87a7kgsorn.fsf@news-spur.riddles.org.uk
обсуждение исходный текст
Ответ на Function `set_config` doesn't work in with query?  (Zexuan Luo <spacewanderlzx@gmail.com>)
Ответы Re: Function `set_config` doesn't work in with query?  (Zexuan Luo <spacewanderlzx@gmail.com>)
Список pgsql-general
>>>>> "Zexuan" == Zexuan Luo <spacewanderlzx@gmail.com> writes:

 Zexuan> For instance:
 Zexuan> ```
 Zexuan> with t as (
 Zexuan>     select set_config('blah', '1', false)
 Zexuan> )
 Zexuan>     select current_setting('blah');

A CTE containing a SELECT query which is not referenced anywhere will
not be executed, even if it contains volatile functions. (CTEs
containing INSERT/UPDATE/DELETE that are not referenced _will_ still be
executed.)

-- 
Andrew (irc:RhodiumToad)


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

Предыдущее
От: Rene Romero Benavides
Дата:
Сообщение: Re: Function `set_config` doesn't work in with query?
Следующее
От: Kristjan Tammekivi
Дата:
Сообщение: Potentially undocumented behaviour change in Postgres 11 concerningOLD record in an after insert trigger