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.