Re: proposal: set GUC variables for single query

Поиск
Список
Период
Сортировка
От Dimitri Fontaine
Тема Re: proposal: set GUC variables for single query
Дата
Msg-id m2vcrofzrf.fsf@2ndQuadrant.fr
обсуждение исходный текст
Ответ на Re: proposal: set GUC variables for single query  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: proposal: set GUC variables for single query
Список pgsql-hackers
Tom Lane <tgl@sss.pgh.pa.us> writes:
> That looks pretty non-future-proof to me.  WITH is a SQL-standard
> syntax, it's not an extension that we control.

Now that you mention it, the following might actually already work:
WITH settings AS (  SELECT set_config('timezone', 'Europe/Amsterdam', t),         set_config('work_mem', '1 GB', t)),
 foo AS (  SELECT …)INSERT INTO bar SELECT * FROM foo; 

So maybe what we need is to only change the is_local parameter to the
function set_config() so that we can have the setting last for only the
current statement?

Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: proposal: set GUC variables for single query
Следующее
От: Tom Lane
Дата:
Сообщение: Re: proposal: set GUC variables for single query