aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/misc/guc.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2009-01-02 01:16:02 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2009-01-02 01:16:02 +0000
commitccdb6627ee07f4bad658905c8b0c56cd29731e43 (patch)
tree743f42dec8259a96000bc50591e20f52b40ed2bf /src/backend/utils/misc/guc.c
parent65deb13436af7633e67886735d85020233e82442 (diff)
downloadpostgresql-ccdb6627ee07f4bad658905c8b0c56cd29731e43.tar.gz
postgresql-ccdb6627ee07f4bad658905c8b0c56cd29731e43.zip
Tweak guc.c to allow underscores in the names of custom variable classes,
and change auto_explain's custom GUC variables to be named auto_explain.xxx not just explain.xxx. Per discussion in connection with the pg_stat_statements patch, it seems like a good idea to have the convention that custom variable classes are named the same as their defining module. Committing separately since this should happen regardless of what happens with pg_stat_statements itself.
Diffstat (limited to 'src/backend/utils/misc/guc.c')
-rw-r--r--src/backend/utils/misc/guc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 57ccfe256e6..62649b8ef42 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -10,7 +10,7 @@
* Written by Peter Eisentraut <peter_e@gmx.net>.
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.484 2009/01/01 17:23:53 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.485 2009/01/02 01:16:02 tgl Exp $
*
*--------------------------------------------------------------------
*/
@@ -7283,11 +7283,11 @@ assign_custom_variable_classes(const char *newval, bool doit, GucSource source)
continue;
}
- if (hasSpaceAfterToken || !isalnum((unsigned char) c))
+ if (hasSpaceAfterToken || !(isalnum((unsigned char) c) || c == '_'))
{
/*
- * Syntax error due to token following space after token or non
- * alpha numeric character
+ * Syntax error due to token following space after token or
+ * non-identifier character
*/
pfree(buf.data);
return NULL;