Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit52a8d4f

Browse files
committed
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 inbefore 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 optionsand allows an error hint to show what values are allowed.
1 parent23c356c commit52a8d4f

File tree

11 files changed

+440
-237
lines changed

11 files changed

+440
-237
lines changed

‎doc/src/sgml/catalogs.sgml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/catalogs.sgml,v 2.162 2008/03/06 18:49:32 momjian Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/catalogs.sgml,v 2.163 2008/03/10 12:55:13 mha Exp $ -->
22
<!--
33
Documentation of the system catalogs, directed toward PostgreSQL developers
44
-->
@@ -6260,8 +6260,8 @@
62606260
<row>
62616261
<entry><structfield>vartype</structfield></entry>
62626262
<entry><type>text</type></entry>
6263-
<entry>Parameter type (<literal>bool</>, <literal>integer</>,
6264-
<literal>real</>, or <literal>string</>)
6263+
<entry>Parameter type (<literal>bool</>, <literal>enum</>,
6264+
<literal>integer</>, <literal>real</>, or <literal>string</>)
62656265
</entry>
62666266
</row>
62676267
<row>
@@ -6281,6 +6281,12 @@
62816281
<entry>Maximum allowed value of the parameter (NULL for non-numeric
62826282
values)</entry>
62836283
</row>
6284+
<row>
6285+
<entry><structfield>enumvals</structfield></entry>
6286+
<entry><type>text</type></entry>
6287+
<entry>Allowed values in enum parameters (NULL for non-enum
6288+
values)</entry>
6289+
</row>
62846290
</tbody>
62856291
</tgroup>
62866292
</table>

‎doc/src/sgml/config.sgml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.169 2008/03/1003:22:29 tgl Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/config.sgml,v 1.170 2008/03/1012:55:13 mha Exp $ -->
22

33
<chapter Id="runtime-config">
44
<title>Server Configuration</title>
@@ -162,7 +162,8 @@ SET ENABLE_SEQSCAN TO OFF;
162162
displaying and updating session run-time parameters. It is equivalent
163163
to <command>SHOW</> and <command>SET</>, but can be more convenient
164164
to use because it can be joined with other tables, or selected from using
165-
any desired selection condition.
165+
any desired selection condition. It also contains more information about
166+
what values are allowed for the parameters.
166167
</para>
167168
</sect1>
168169

‎src/backend/catalog/system_views.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 1996-2008, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/backend/catalog/system_views.sql,v 1.48 2008/01/01 19:45:48 momjian Exp $
6+
* $PostgreSQL: pgsql/src/backend/catalog/system_views.sql,v 1.49 2008/03/10 12:55:13 mha Exp $
77
*/
88

99
CREATEVIEWpg_rolesAS
@@ -173,7 +173,7 @@ CREATE VIEW pg_settings AS
173173
SELECT*
174174
FROM pg_show_all_settings()AS A
175175
(nametext, settingtext, unittext, categorytext, short_desctext, extra_desctext,
176-
contexttext, vartypetext, sourcetext, min_valtext, max_valtext);
176+
contexttext, vartypetext, sourcetext, min_valtext, max_valtext, enumvalstext);
177177

178178
CREATERULEpg_settings_uAS
179179
ONUPDATE TO pg_settings

‎src/backend/tcop/postgres.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.543 2008/02/17 04:21:05 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/tcop/postgres.c,v 1.544 2008/03/10 12:55:13 mha Exp $
1212
*
1313
* NOTES
1414
* this is the "main" module of the postgres backend and
@@ -85,7 +85,7 @@ CommandDest whereToSendOutput = DestDebug;
8585
/* flag for logging end of session */
8686
boolLog_disconnections= false;
8787

88-
LogStmtLevellog_statement=LOGSTMT_NONE;
88+
intlog_statement=LOGSTMT_NONE;
8989

9090
/* GUC variable for maximum stack depth (measured in kilobytes) */
9191
intmax_stack_depth=100;

‎src/backend/utils/error/elog.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
*
4343
*
4444
* IDENTIFICATION
45-
* $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.201 2008/01/01 19:45:53 momjian Exp $
45+
* $PostgreSQL: pgsql/src/backend/utils/error/elog.c,v 1.202 2008/03/10 12:55:13 mha Exp $
4646
*
4747
*-------------------------------------------------------------------------
4848
*/
@@ -80,7 +80,7 @@ sigjmp_buf *PG_exception_stack = NULL;
8080
externboolredirection_done;
8181

8282
/* GUC parameters */
83-
PGErrorVerbosityLog_error_verbosity=PGERROR_VERBOSE;
83+
intLog_error_verbosity=PGERROR_VERBOSE;
8484
char*Log_line_prefix=NULL;/* format for extra log line info */
8585
intLog_destination=LOG_DESTINATION_STDERR;
8686

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp