Re: Unexpected behaviour: it was documented to return the same value

From: KES <kes-kes(at)yandex(dot)ru>
To: David G(dot) Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>, "pgsql-docs(at)lists(dot)postgresql(dot)org" <pgsql-docs(at)lists(dot)postgresql(dot)org>
Subject: Re: Unexpected behaviour: it was documented to return the same value
Date: 2025-07-13 13:39:12
Message-ID: 25341752413730@mail.yandex.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-docs

<div>I suppose that DEFAULT syntax should be used to set setting to its default value. Eg.</div><div><div>set_config( 'my.option', DEFAULT, false )</div><div>This is clear what should happen here. Also this syntax will correspond to other places, eg. INSERT INTO xx (name) VALUES (DEFAULT).</div><div> </div><div>Using NULL to set reset the value to the default is very very confusing.</div><div><div>set_config( 'my.option', NULL, false )</div><div>Expected: this call should make option unrecognizable again.</div></div></div><div><br /></div><div><br /></div><div>----------------</div>
<div>Кому: David G. Johnston (david(dot)g(dot)johnston(at)gmail(dot)com), pgsql-docs(at)lists(dot)postgresql(dot)org (pgsql-docs(at)lists(dot)postgresql(dot)org);<br /></div>

<div>Тема: Unexpected behaviour: it was documented to return the same value;<br /></div>
<div>13.07.2025, 16:34, "KES" &lt;kes-kes(at)yandex(dot)ru&gt;:<br /></div>
<blockquote><div>I would prefer to remove the option from the configuration list instead of having it reset to empty string.</div><div> </div><div>Eg. set_config( 'my.option', NULL, false )</div><div> </div><div>Having it to return the empty string cause differences in the behaviour when parameter is not recognized at all and when it setup to default.</div><div> </div><div>How to make it "unrecognizable" again using set_config/RESET?</div><div> </div><div>The exact problem I am trying to resolve was asked here: <a href="https://stackoverflow.com/q/50923911/4632019">https://stackoverflow.com/q/50923911/4632019</a></div><div> </div><div><br /></div><div><br /></div><div>----------------</div>
<div>Кому: <a href="mailto:kes-kes(at)yandex(dot)ru">kes-kes(at)yandex(dot)ru</a> (<a href="mailto:kes-kes(at)yandex(dot)ru">kes-kes(at)yandex(dot)ru</a>), <a href="mailto:pgsql-docs(at)lists(dot)postgresql(dot)org">pgsql-docs(at)lists(dot)postgresql(dot)org</a> (<a href="mailto:pgsql-docs(at)lists(dot)postgresql(dot)org">pgsql-docs(at)lists(dot)postgresql(dot)org</a>);<br /></div>

<div>Тема: Unexpected behaviour: it was documented to return the same value;<br /></div>
<div>07.07.2025, 17:40, "David G. Johnston" &lt;<a href="mailto:david(dot)g(dot)johnston(at)gmail(dot)com">david(dot)g(dot)johnston(at)gmail(dot)com</a>&gt;:<br /></div>
<blockquote><div dir="ltr"><div dir="ltr"><div class="9d2662d4c03e6b9f3bb9a430a42f74e581bf8e361cebb2c6d64fb4d6842d6ebgmail_default" style="font-family:'arial' , 'helvetica' , sans-serif"><span style="font-family:'arial' , 'helvetica' , sans-serif">On Mon, Jul 7, 2025 at 6:51 AM David G. Johnston &lt;<a href="mailto:david(dot)g(dot)johnston(at)gmail(dot)com">david(dot)g(dot)johnston(at)gmail(dot)com</a>&gt; wrote:</span></div></div><div class="d96d0fa01d7ccee98219a8e94bccf061f13ca48719c8a60033905b23b39675agmail_quote 425685429bfea96f41dc11498b978baf5ec078e9233601eab4dccacd580e6022gmail_quote_container"><blockquote class="d96d0fa01d7ccee98219a8e94bccf061f13ca48719c8a60033905b23b39675agmail_quote" style="border-left-color:rgb( 204 , 204 , 204 );border-left-style:solid;border-left-width:1px;margin:0px 0px 0px 0.8ex;padding-left:1ex">On Saturday, July 5, 2025, PG Doc comments form &lt;<a href="mailto:noreply(at)postgresql(dot)org" target="_blank">noreply(at)postgresql(dot)org</a>&gt; wrote:<br /><blockquote class="d96d0fa01d7ccee98219a8e94bccf061f13ca48719c8a60033905b23b39675agmail_quote" style="border-left-color:rgb( 204 , 204 , 204 );border-left-style:solid;border-left-width:1px;margin:0px 0px 0px 0.8ex;padding-left:1ex">The following documentation comment has been logged on the website:<br />
<br />
Page: <a href="https://www.postgresql.org/docs/17/functions-admin.html" target="_blank">https://www.postgresql.org/docs/17/functions-admin.html</a><br />
Description:<br /></blockquote></blockquote><div><br /></div><div class="9d2662d4c03e6b9f3bb9a430a42f74e581bf8e361cebb2c6d64fb4d6842d6ebgmail_default" style="font-family:'arial' , 'helvetica' , sans-serif">Yeah, this clarification just wasn't back-patched.</div><div class="9d2662d4c03e6b9f3bb9a430a42f74e581bf8e361cebb2c6d64fb4d6842d6ebgmail_default" style="font-family:'arial' , 'helvetica' , sans-serif"><br /></div><div class="9d2662d4c03e6b9f3bb9a430a42f74e581bf8e361cebb2c6d64fb4d6842d6ebgmail_default" style="font-family:'arial' , 'helvetica' , sans-serif"><a href="https://www.postgresql.org/docs/18/functions-admin.html#FUNCTIONS-ADMIN-SET">https://www.postgresql.org/docs/18/functions-admin.html#FUNCTIONS-ADMIN-SET</a></div><div class="9d2662d4c03e6b9f3bb9a430a42f74e581bf8e361cebb2c6d64fb4d6842d6ebgmail_default" style="font-family:'arial' , 'helvetica' , sans-serif"><br /></div><div class="9d2662d4c03e6b9f3bb9a430a42f74e581bf8e361cebb2c6d64fb4d6842d6ebgmail_default" style="font-family:'arial' , 'helvetica' , sans-serif">"set_config accepts the NULL value for new_value, but as settings cannot be null, it is interpreted as a request to reset the setting to its default value."</div><div class="9d2662d4c03e6b9f3bb9a430a42f74e581bf8e361cebb2c6d64fb4d6842d6ebgmail_default" style="font-family:'arial' , 'helvetica' , sans-serif"><br /></div><div class="9d2662d4c03e6b9f3bb9a430a42f74e581bf8e361cebb2c6d64fb4d6842d6ebgmail_default" style="font-family:'arial' , 'helvetica' , sans-serif">David J.</div><div class="9d2662d4c03e6b9f3bb9a430a42f74e581bf8e361cebb2c6d64fb4d6842d6ebgmail_default" style="font-family:'arial' , 'helvetica' , sans-serif"><br /></div></div></div>
</blockquote></blockquote>

Attachment Content-Type Size
unknown_filename text/html 5.4 KB

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Laurenz Albe 2025-07-13 14:58:57 Re: please define 'statement' in the glossary
Previous Message KES 2025-07-13 13:34:46 Re: Unexpected behaviour: it was documented to return the same value