1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-28 23:42:10 +03:00

Implement enum type for guc parameters, and convert a couple of existing

variables to it. More need to be converted, but I wanted to get this in
before it conflicts with too much...

Other than just centralising the text-to-int conversion for parameters,
this allows the pg_settings view to contain a list of available options
and allows an error hint to show what values are allowed.
This commit is contained in:
Magnus Hagander
2008-03-10 12:55:13 +00:00
parent 23c356ccec
commit 52a8d4f8f7
11 changed files with 440 additions and 237 deletions

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/catalogs.sgml,v 2.162 2008/03/06 18:49:32 momjian Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/catalogs.sgml,v 2.163 2008/03/10 12:55:13 mha Exp $ -->
<!--
Documentation of the system catalogs, directed toward PostgreSQL developers
-->
@ -6260,8 +6260,8 @@
<row>
<entry><structfield>vartype</structfield></entry>
<entry><type>text</type></entry>
<entry>Parameter type (<literal>bool</>, <literal>integer</>,
<literal>real</>, or <literal>string</>)
<entry>Parameter type (<literal>bool</>, <literal>enum</>,
<literal>integer</>, <literal>real</>, or <literal>string</>)
</entry>
</row>
<row>
@ -6281,6 +6281,12 @@
<entry>Maximum allowed value of the parameter (NULL for non-numeric
values)</entry>
</row>
<row>
<entry><structfield>enumvals</structfield></entry>
<entry><type>text</type></entry>
<entry>Allowed values in enum parameters (NULL for non-enum
values)</entry>
</row>
</tbody>
</tgroup>
</table>

View File

@ -1,4 +1,4 @@
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.169 2008/03/10 03:22:29 tgl Exp $ -->
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.170 2008/03/10 12:55:13 mha Exp $ -->
<chapter Id="runtime-config">
<title>Server Configuration</title>
@ -162,7 +162,8 @@ SET ENABLE_SEQSCAN TO OFF;
displaying and updating session run-time parameters. It is equivalent
to <command>SHOW</> and <command>SET</>, but can be more convenient
to use because it can be joined with other tables, or selected from using
any desired selection condition.
any desired selection condition. It also contains more information about
what values are allowed for the parameters.
</para>
</sect1>