Re: Function `set_config` doesn't work in with query? - Mailing list pgsql-general

From Rene Romero Benavides
Subject Re: Function `set_config` doesn't work in with query?
Date
Msg-id CANaGW0_iM01Q=p5c=k0aM-Kn5jdL92xgxEOfjZ5RSNo1YXOafw@mail.gmail.com
Whole thread Raw
In response to Function `set_config` doesn't work in with query?  (Zexuan Luo <spacewanderlzx@gmail.com>)
List 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 by date:

Previous
From: Zexuan Luo
Date:
Subject: Function `set_config` doesn't work in with query?
Next
From: Andrew Gierth
Date:
Subject: Re: Function `set_config` doesn't work in with query?