Doc: improve cross-references for SET/SHOW.

The corresponding functions set_config and current_setting were
mostly not hyperlinked.  Clarify their descriptions a tad, too.

Discussion: https://postgr.es/m/161183356250.4077.687338658090583892@wrigleys.postgresql.org
This commit is contained in:
Tom Lane 2021-01-29 10:46:14 -05:00
parent b41645460a
commit f743a2bbd4
4 changed files with 15 additions and 12 deletions

View File

@ -263,8 +263,9 @@ shared_buffers = 128MB
<listitem> <listitem>
<para> <para>
The <link linkend="sql-show"><command>SHOW</command></link> command allows inspection of the The <link linkend="sql-show"><command>SHOW</command></link> command allows inspection of the
current value of all parameters. The corresponding function is current value of any parameter. The corresponding SQL function is
<function>current_setting(setting_name text)</function>. <function>current_setting(setting_name text)</function>
(see <xref linkend="functions-admin-set"/>).
</para> </para>
</listitem> </listitem>
@ -273,8 +274,9 @@ shared_buffers = 128MB
The <link linkend="sql-set"><command>SET</command></link> command allows modification of the The <link linkend="sql-set"><command>SET</command></link> command allows modification of the
current value of those parameters that can be set locally to a current value of those parameters that can be set locally to a
session; it has no effect on other sessions. session; it has no effect on other sessions.
The corresponding function is The corresponding SQL function is
<function>set_config(setting_name, new_value, is_local)</function>. <function>set_config(setting_name, new_value, is_local)</function>
(see <xref linkend="functions-admin-set"/>).
</para> </para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>

View File

@ -24593,8 +24593,9 @@ SELECT collation for ('foo' COLLATE "de_DE");
setting <parameter>setting_name</parameter>. If there is no such setting <parameter>setting_name</parameter>. If there is no such
setting, <function>current_setting</function> throws an error setting, <function>current_setting</function> throws an error
unless <parameter>missing_ok</parameter> is supplied and unless <parameter>missing_ok</parameter> is supplied and
is <literal>true</literal>. This function corresponds to is <literal>true</literal> (in which case NULL is returned).
the <acronym>SQL</acronym> command <command>SHOW</command>. This function corresponds to
the <acronym>SQL</acronym> command <xref linkend="sql-show"/>.
</para> </para>
<para> <para>
<literal>current_setting('datestyle')</literal> <literal>current_setting('datestyle')</literal>
@ -24617,10 +24618,10 @@ SELECT collation for ('foo' COLLATE "de_DE");
Sets the parameter <parameter>setting_name</parameter> Sets the parameter <parameter>setting_name</parameter>
to <parameter>new_value</parameter>, and returns that value. to <parameter>new_value</parameter>, and returns that value.
If <parameter>is_local</parameter> is <literal>true</literal>, the new If <parameter>is_local</parameter> is <literal>true</literal>, the new
value will only apply for the current transaction. If you want the new value will only apply during the current transaction. If you want the
value to apply for the current session, use <literal>false</literal> new value to apply for the rest of the current session,
instead. This function corresponds to the SQL use <literal>false</literal> instead. This function corresponds to
command <command>SET</command>. the SQL command <xref linkend="sql-set"/>.
</para> </para>
<para> <para>
<literal>set_config('log_statement_stats', 'off', false)</literal> <literal>set_config('log_statement_stats', 'off', false)</literal>

View File

@ -267,7 +267,7 @@ SELECT setseed(<replaceable>value</replaceable>);
<para> <para>
The function <function>set_config</function> provides equivalent The function <function>set_config</function> provides equivalent
functionality; see <xref linkend="functions-admin"/>. functionality; see <xref linkend="functions-admin-set"/>.
Also, it is possible to UPDATE the Also, it is possible to UPDATE the
<link linkend="view-pg-settings"><structname>pg_settings</structname></link> <link linkend="view-pg-settings"><structname>pg_settings</structname></link>
system view to perform the equivalent of <command>SET</command>. system view to perform the equivalent of <command>SET</command>.

View File

@ -129,7 +129,7 @@ SHOW ALL
<para> <para>
The function <function>current_setting</function> produces The function <function>current_setting</function> produces
equivalent output; see <xref linkend="functions-admin"/>. equivalent output; see <xref linkend="functions-admin-set"/>.
Also, the Also, the
<link linkend="view-pg-settings"><structname>pg_settings</structname></link> <link linkend="view-pg-settings"><structname>pg_settings</structname></link>
system view produces the same information. system view produces the same information.