mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
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.
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user