Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bd74c40

Browse filesBrowse 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
Copy full SHA for bd74c40

File tree

1 file changed

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

1 file changed

+2
-2
lines changed

‎src/backend/utils/misc/guc.c

Copy file name to clipboardExpand all lines: src/backend/utils/misc/guc.c
+2-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.