Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9aa30e7

Browse files
committed
Actually, there's no need to use pg_strcasecmp for checking exception
names, because the name we got from the lexer is already downcased. Just store the table in lower case and use strcmp ...
1 parent d529989 commit 9aa30e7

File tree

2 files changed

+180
-180
lines changed

2 files changed

+180
-180
lines changed

src/pl/plpgsql/src/pl_exec.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* procedural language
44
*
55
* IDENTIFICATION
6-
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.113 2004/08/02 01:30:49 tgl Exp $
6+
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.114 2004/08/02 17:03:45 tgl Exp $
77
*
88
* This software is copyrighted by Jan Wieck - Hamburg.
99
*
@@ -806,7 +806,7 @@ exception_matches_conditions(ErrorData *edata, PLpgSQL_condition *cond)
806806
* OTHERS matches everything *except* query-canceled;
807807
* if you're foolish enough, you can match that explicitly.
808808
*/
809-
if (pg_strcasecmp(condname, "OTHERS") == 0)
809+
if (strcmp(condname, "others") == 0)
810810
{
811811
if (edata->sqlerrcode == ERRCODE_QUERY_CANCELED)
812812
return false;
@@ -815,7 +815,7 @@ exception_matches_conditions(ErrorData *edata, PLpgSQL_condition *cond)
815815
}
816816
for (i = 0; exception_label_map[i].label != NULL; i++)
817817
{
818-
if (pg_strcasecmp(condname, exception_label_map[i].label) == 0)
818+
if (strcmp(condname, exception_label_map[i].label) == 0)
819819
{
820820
int labelerrcode = exception_label_map[i].sqlerrstate;
821821

0 commit comments

Comments
 (0)