1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Introduce pg_settings_get_flags() to find flags associated to a GUC

The most meaningful flags are shown, which are the ones useful for the
user and for automating and extending the set of tests supported
currently by check_guc.

This script may actually be removed in the future, but we are not
completely sure yet if and how we want to support the remaining sanity
checks performed there, that are now integrated in the main regression
test suite as of this commit.

Thanks also to Peter Eisentraut and Kyotaro Horiguchi for the
discussion.

Bump catalog version.

Author: Justin Pryzby
Discussion: https://postgr.es/m/20211129030833.GJ17618@telsasoft.com
This commit is contained in:
Michael Paquier
2022-01-31 08:56:41 +09:00
parent 02b8048ba5
commit d10e41d423
6 changed files with 208 additions and 1 deletions

View File

@ -23859,6 +23859,43 @@ SELECT currval(pg_get_serial_sequence('sometable', 'id'));
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<indexterm>
<primary>pg_settings_get_flags</primary>
</indexterm>
<function>pg_settings_get_flags</function> ( <parameter>guc</parameter> <type>text</type> )
<returnvalue>text[]</returnvalue>
</para>
<para>
Returns an array of the flags associated with the given GUC, or
<literal>NULL</literal> if it does not exist. The result is
an empty array if the GUC exists but there are no flags to show.
Only the most useful flags are exposed, as of the following:
<simplelist>
<member>
<literal>EXPLAIN</literal>: parameters included in
<command>EXPLAIN (SETTINGS)</command> commands.
</member>
<member>
<literal>NO_SHOW_ALL</literal>: parameters excluded from
<command>SHOW ALL</command> commands.
</member>
<member>
<literal>NO_RESET_ALL</literal>: parameters excluded from
<command>RESET ALL</command> commands.
</member>
<member>
<literal>NOT_IN_SAMPLE</literal>: parameters not included in
<filename>postgresql.conf</filename> by default.
</member>
<member>
<literal>RUNTIME_COMPUTED</literal>: runtime-computed parameters.
</member>
</simplelist>
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<indexterm>