I just learned from a pg friend, it's possible to set your own made up setting_name using set_config(),
if the setting_name contains at least one dot ".".
I didn't know about this and have always thought it's not possible,
due to early in my career having run into the error message
you get when not having a dot in the name:
SELECT set_config('foobar','test',true);
ERROR: unrecognized configuration parameter "foobar"
If instead having a dot in the name, it works:
SELECT set_config('foo.bar','test',true);
set_config
------------
test
(1 row)
this behaviour is not mentioned anywhere as far as I can see:
"set_config ( setting_name text, new_value text, is_local boolean ) → text
Sets the parameter setting_name to new_value, and returns that value. If is_local is true, the new value will only apply for the current transaction. If you want the new value to apply for the current session, use false instead. This function corresponds to the SQL command SET."
Perhaps a paragraph where this is clarified should be added?