Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commita323bce

Browse files
committed
plpgsql EXIT construct forgot to downcase or quote-strip its identifier
argument, leading to label matching failures at run-time. Per report fromPatrick Fiche. Also, fix it so that an unrecognized label argument drawsa more useful error message than 'syntax error'.
1 parent0b11204 commita323bce

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

‎src/pl/plpgsql/src/gram.y

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* procedural language
55
*
66
* IDENTIFICATION
7-
* $PostgreSQL: pgsql/src/pl/plpgsql/src/gram.y,v 1.62 2004/09/14 23:46:46 neilc Exp $
7+
* $PostgreSQL: pgsql/src/pl/plpgsql/src/gram.y,v 1.63 2004/10/12 15:44:15 tgl Exp $
88
*
99
* This software is copyrighted by Jan Wieck - Hamburg.
1010
*
@@ -1639,7 +1639,18 @@ opt_label:
16391639
opt_exitlabel:
16401640
{$$ =NULL; }
16411641
|T_LABEL
1642-
{$$ = strdup(yytext); }
1642+
{
1643+
char*name;
1644+
1645+
plpgsql_convert_ident(yytext, &name,1);
1646+
$$ = strdup(name);
1647+
pfree(name);
1648+
}
1649+
|T_WORD
1650+
{
1651+
/* just to give a better error than "syntax error"*/
1652+
yyerror("no such label");
1653+
}
16431654
;
16441655

16451656
opt_exitcond:';'

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp