Re: set_config() documentation clarification - Mailing list pgsql-hackers

From Chapman Flack
Subject Re: set_config() documentation clarification
Date
Msg-id 5FF33747.9010603@anastigmatix.net
Whole thread Raw
In response to set_config() documentation clarification  ("Joel Jacobson" <joel@compiler.org>)
List pgsql-hackers
On 01/04/21 10:25, Joel Jacobson wrote:
> 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 ".".

It works that way so you can set a config variable needed by an extension,
if necessary before the extension is loaded, so PostgreSQL doesn't know yet
what variable names with that prefix are or aren't valid. Once the extension
that defines the prefix (before the first dot) is loaded, it will handle
any variables with that prefix that it recognizes, and errors will be
reported for any others.

I'm not sure how much of that behavior needs to be documented for
set_config() itself; it gets a little deep into the weeds of extension
development. Is it documented there? In that case, maybe the briefest
of mentions at set_config() would be appropriate, such as "names starting
with a prefix and a dot can be treated specially, as described at [link]".

Regards,
-Chap



pgsql-hackers by date:

Previous
From: Dean Rasheed
Date:
Subject: Re: PoC/WIP: Extended statistics on expressions
Next
From: Isaac Morland
Date:
Subject: Re: Safety/validity of resetting permissions by updating system tables