Re-allow underscore as first character of custom GUC names.
Commit 3db826bd5 intended that valid_custom_variable_name's rules for valid identifiers match those of scan.l. However, I (tgl) had some kind of brain fade and put "_" in the wrong list. Fix by Japin Li, per bug #17415 from Daniel Polski. Discussion: https://postgr.es/m/17415-ebdb683d7e09a51c@postgresql.org
This commit is contained in:
parent
627c79a1e8
commit
dd7c059791
@ -5390,13 +5390,13 @@ valid_custom_variable_name(const char *name)
|
|||||||
name_start = true;
|
name_start = true;
|
||||||
}
|
}
|
||||||
else if (strchr("ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
else if (strchr("ABCDEFGHIJKLMNOPQRSTUVWXYZ"
|
||||||
"abcdefghijklmnopqrstuvwxyz", *p) != NULL ||
|
"abcdefghijklmnopqrstuvwxyz_", *p) != NULL ||
|
||||||
IS_HIGHBIT_SET(*p))
|
IS_HIGHBIT_SET(*p))
|
||||||
{
|
{
|
||||||
/* okay as first or non-first character */
|
/* okay as first or non-first character */
|
||||||
name_start = false;
|
name_start = false;
|
||||||
}
|
}
|
||||||
else if (!name_start && strchr("0123456789_$", *p) != NULL)
|
else if (!name_start && strchr("0123456789$", *p) != NULL)
|
||||||
/* okay as non-first character */ ;
|
/* okay as non-first character */ ;
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user