Skip to content

Commit bd74c40

Browse files
committed
Re-allow underscore as first character of custom GUC names.
Commit 3db826b 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
1 parent 0475a97 commit bd74c40

File tree

1 file changed

+2
-2
lines changed
  • src/backend/utils/misc

1 file changed

+2
-2
lines changed

src/backend/utils/misc/guc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5474,13 +5474,13 @@ valid_custom_variable_name(const char *name)
54745474
name_start = true;
54755475
}
54765476
else if (strchr("ABCDEFGHIJKLMNOPQRSTUVWXYZ"
5477-
"abcdefghijklmnopqrstuvwxyz", *p) != NULL ||
5477+
"abcdefghijklmnopqrstuvwxyz_", *p) != NULL ||
54785478
IS_HIGHBIT_SET(*p))
54795479
{
54805480
/* okay as first or non-first character */
54815481
name_start = false;
54825482
}
5483-
else if (!name_start && strchr("0123456789_$", *p) != NULL)
5483+
else if (!name_start && strchr("0123456789$", *p) != NULL)
54845484
/* okay as non-first character */ ;
54855485
else
54865486
return false;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy