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

Commit 201e5b2

Browse files
committed
Add new PGC_S_DATABASE_USER enum value to several places missed by my patch
last week. Per note and patch from Jeff Davis.
1 parent 8d54c24 commit 201e5b2

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/backend/utils/misc/guc.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Written by Peter Eisentraut <peter_e@gmx.net>.
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.520 2009/10/03 18:04:57 tgl Exp $
13+
* $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.521 2009/10/13 14:18:40 alvherre Exp $
1414
*
1515
*--------------------------------------------------------------------
1616
*/
@@ -460,6 +460,7 @@ const char *const GucSource_Names[] =
460460
/* PGC_S_ARGV */ "command line",
461461
/* PGC_S_DATABASE */ "database",
462462
/* PGC_S_USER */ "user",
463+
/* PGC_S_DATABASE_USER */ "database user",
463464
/* PGC_S_CLIENT */ "client",
464465
/* PGC_S_OVERRIDE */ "override",
465466
/* PGC_S_INTERACTIVE */ "interactive",
@@ -4556,7 +4557,8 @@ set_config_option(const char *name, const char *value,
45564557
*/
45574558
elevel = IsUnderPostmaster ? DEBUG3 : LOG;
45584559
}
4559-
else if (source == PGC_S_DATABASE || source == PGC_S_USER)
4560+
else if (source == PGC_S_DATABASE || source == PGC_S_USER ||
4561+
source == PGC_S_DATABASE_USER)
45604562
elevel = WARNING;
45614563
else
45624564
elevel = ERROR;
@@ -5762,6 +5764,7 @@ define_custom_variable(struct config_generic * variable)
57625764
break;
57635765
case PGC_S_DATABASE:
57645766
case PGC_S_USER:
5767+
case PGC_S_DATABASE_USER:
57655768
case PGC_S_CLIENT:
57665769
case PGC_S_SESSION:
57675770
default:

src/include/utils/guc.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Copyright (c) 2000-2009, PostgreSQL Global Development Group
88
* Written by Peter Eisentraut <peter_e@gmx.net>.
99
*
10-
* $PostgreSQL: pgsql/src/include/utils/guc.h,v 1.107 2009/10/07 22:14:26 alvherre Exp $
10+
* $PostgreSQL: pgsql/src/include/utils/guc.h,v 1.108 2009/10/13 14:18:40 alvherre Exp $
1111
*--------------------------------------------------------------------
1212
*/
1313
#ifndef GUC_H
@@ -77,6 +77,8 @@ typedef enum
7777
* as the actual source of any value). This is an interactive case, but
7878
* it needs its own source value because some assign hooks need to make
7979
* different validity checks in this case.
80+
*
81+
* NB: see GucSource_Names in guc.c if you change this.
8082
*/
8183
typedef enum
8284
{

0 commit comments

Comments
 (0)