Skip to content

Navigation Menu

Sign in
Appearance settings

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 a18b6d2

Browse filesBrowse files
committed
ecpg: Catch zero-length Unicode identifiers correctly
The previous code to detect a zero-length identifier when using Unicode identifiers such as exec sql select u&""; did not work. This fixes that. Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us> Discussion: https://www.postgresql.org/message-id/flat/82fafa79-331c-9d65-e51b-8b5d1b2383fc%40enterprisedb.com
1 parent bed6ed3 commit a18b6d2
Copy full SHA for a18b6d2

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
  • src/interfaces/ecpg/preproc
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎src/interfaces/ecpg/preproc/pgc.l

Copy file name to clipboardExpand all lines: src/interfaces/ecpg/preproc/pgc.l
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -737,7 +737,7 @@ cppline {space}*#([^i][A-Za-z]*|{if}|{ifdef}|{ifndef}|{import})((\/\*[^*/]*\*+
737737
}
738738
<xui>{dquote} {
739739
BEGIN(state_before_str_start);
740-
if (literallen == 2) /* "U&" */
740+
if (literallen == 0)
741741
mmerror(PARSE_ERROR, ET_ERROR, "zero-length delimited identifier");
742742
/* The backend will truncate the identifier here. We do not as it does not change the result. */
743743
base_yylval.str = psprintf("U&\"%s\"", literalbuf);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.