Search Postgresql Archives

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Fri, Jan 4, 2019 at 3:37 AM Zexuan Luo <spacewanderlzx@xxxxxxxxx> 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:
https://dba.stackexchange.com/questions/29961/how-do-i-set-and-get-custom-database-variables

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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux