Search Postgresql Archives

Why don't custom GUCs show in pg_settings?

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

 



Version - 9.5
O/S - not applicable

SELECT set_config('davidj.testvar', 'value');
SELECT current_setting('davidj.testvar') --value
SELECT * FROM pg_settings WHERE name ~ 'testvar'  --or ~davidj... either way nothing shows

and:

SELECT current_setting('davidj.testvar2') -- unrecognized configuration parameter

The underlying goal is to use the custom GUC within a CREATE VIEW in a where clause.  If the user issues a valid set_config for the GUC the query is appropriately filtered otherwise I set things up so that particular clause will not apply.

I've seen and can work with various work-arounds but it seems odd that pg_settings doesn't show these custom GUCs.

Is there a simple way to read the value without receiving an error if the value is missing?

David J.


[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