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

Поиск
Список
Период
Сортировка
От Rene Romero Benavides
Тема Re: Function `set_config` doesn't work in with query?
Дата
Msg-id CANaGW0_iM01Q=p5c=k0aM-Kn5jdL92xgxEOfjZ5RSNo1YXOafw@mail.gmail.com
обсуждение исходный текст
Ответ на Function `set_config` doesn't work in with query?  (Zexuan Luo <spacewanderlzx@gmail.com>)
Список pgsql-general

On Fri, Jan 4, 2019 at 3:37 AM Zexuan Luo <spacewanderlzx@gmail.com> wrote:
For instance:
```
with t as (
    select set_config('blah', '1', false)
)
    select current_setting('blah');
select current_setting('blah');
```

Execute queries above gets these error messages:
psql:test-query-dump.sql:4: ERROR:  unrecognized configuration parameter "blah"
psql:test-query-dump.sql:5: ERROR:  unrecognized configuration parameter "blah"

Thank you for any responses.


The only parameters you can set that way, are the ones listed in:
SELECT name FROM pg_settings;

For user defined parameters, check this:

--
El genio es 1% inspiración y 99% transpiración.
Thomas Alva Edison
http://pglearn.blogspot.mx/

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

Предыдущее
От: Zexuan Luo
Дата:
Сообщение: Function `set_config` doesn't work in with query?
Следующее
От: Andrew Gierth
Дата:
Сообщение: Re: Function `set_config` doesn't work in with query?