Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ae0b510

Browse files
author
Commitfest Bot
committed
[CF 5548] v1 - Document custom settings more consistently
This branch was automatically generated by a robot using patches from an email thread registered at: https://commitfest.postgresql.org/patch/5548 The branch will be overwritten each time a new patch version is posted to the thread, and also periodically to check for bitrot caused by changes on the master branch. Patch(es): https://www.postgresql.org/message-id/CAKFQuwbh0Pt03JWiV1iCc23uyQU1KYfXAyCsm5UGnKM2=hz_SQ@mail.gmail.com Author(s): David Johnston
2 parents 03c53a7 + 37a5667 commit ae0b510

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

doc/src/sgml/config.sgml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
<para>
2525
All parameter names are case-insensitive. Every parameter takes a
26-
value of one of five types: boolean, string, integer, floating point,
26+
non-null value of one of five types: boolean, string, integer, floating point,
2727
or enumerated (enum). The type determines the syntax for setting the
2828
parameter:
2929
</para>
@@ -12018,14 +12018,20 @@ dynamic_library_path = '/usr/local/lib/postgresql:$libdir'
1201812018
<para>
1201912019
Because custom options may need to be set in processes that have not
1202012020
loaded the relevant extension module, <productname>PostgreSQL</productname>
12021-
will accept a setting for any two-part parameter name. Such variables
12022-
are treated as placeholders and have no function until the module that
12023-
defines them is loaded. When an extension module is loaded, it will add
12021+
will accept a setting for any two-part parameter name.
12022+
When an extension module is loaded, it will add
1202412023
its variable definitions and convert any placeholder values according to
1202512024
those definitions. If there are any unrecognized placeholders
1202612025
that begin with its extension name, warnings are issued and those
1202712026
placeholders are removed.
1202812027
</para>
12028+
12029+
<para>
12030+
If a placeholder is created in a session it will exist for the
12031+
lifetime of the session unless removed by an extension.
12032+
Placeholders have a string data type with a reset value of the empty string.
12033+
</para>
12034+
1202912035
</sect1>
1203012036

1203112037
<sect1 id="runtime-config-developer">

doc/src/sgml/func.sgml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28555,7 +28555,7 @@ acl | {postgres=arwdDxtm/postgres,foo=r/postgres}
2855528555
<returnvalue>text</returnvalue>
2855628556
</para>
2855728557
<para>
28558-
Returns the current value of the
28558+
Returns the current non-null value of the
2855928559
setting <parameter>setting_name</parameter>. If there is no such
2856028560
setting, <function>current_setting</function> throws an error
2856128561
unless <parameter>missing_ok</parameter> is supplied and
@@ -28589,6 +28589,17 @@ acl | {postgres=arwdDxtm/postgres,foo=r/postgres}
2858928589
use <literal>false</literal> instead. This function corresponds to
2859028590
the SQL command <xref linkend="sql-set"/>.
2859128591
</para>
28592+
<para>
28593+
<function>set_config</function> accepts the NULL value for
28594+
<parameter>new_value</parameter>, but as settings cannot be null this input
28595+
is interpreted as a request to set the setting to its default value.
28596+
</para>
28597+
<para>
28598+
If <parameter>setting_name</parameter> does not already exist
28599+
<function>set_config</function> throws an error unless the identifier is a valid
28600+
<link linkend="runtime-config-custom">custom option</link> name, in which it
28601+
creates a placeholder with the empty string as its old value.
28602+
</para>
2859228603
<para>
2859328604
<function>set_config</function> accepts the NULL value for
2859428605
<parameter>new_value</parameter>, but as settings cannot be null, it

0 commit comments

Comments
 (0)