Ok. Yes, changing the existing behaviour could lead to back compatibility issues.
 
But have you found the functionality to "make an option unrecognizable again" useful? In theory, would it be appropriate to have eg. "UNSET" to perform that?


----------------
Кому: KES (kes-...@yandex.ru);
Копия: pgsql-docs@lists.postgresql.org;
Тема: Unexpected behaviour: it was documented to return the same value;
13.07.2025, 18:17, "David G. Johnston" <david.g.johns...@gmail.com>:
On Sunday, July 13, 2025, KES <kes-...@yandex.ru> wrote:
I suppose that DEFAULT syntax should be used to set setting to its default value. Eg.
set_config( 'my.option', DEFAULT, false )
This is clear what should happen here. Also this syntax will correspond to other places, eg. INSERT INTO xx (name) VALUES (DEFAULT).
 
Using NULL to set reset the value to the default is very very confusing.
set_config( 'my.option', NULL, false )
Expected: this call should make option unrecognizable again.

I don’t see us changing this even if someone were willing to write a patch.  You will have to make do with the behavior that exists.

David J.

Reply via email to