提交 9aa30e71 编写于 作者: T Tom Lane

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 ...
上级 d5299891
......@@ -3,7 +3,7 @@
* procedural language
*
* IDENTIFICATION
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.113 2004/08/02 01:30:49 tgl Exp $
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.114 2004/08/02 17:03:45 tgl Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
......@@ -806,7 +806,7 @@ exception_matches_conditions(ErrorData *edata, PLpgSQL_condition *cond)
* OTHERS matches everything *except* query-canceled;
* if you're foolish enough, you can match that explicitly.
*/
if (pg_strcasecmp(condname, "OTHERS") == 0)
if (strcmp(condname, "others") == 0)
{
if (edata->sqlerrcode == ERRCODE_QUERY_CANCELED)
return false;
......@@ -815,7 +815,7 @@ exception_matches_conditions(ErrorData *edata, PLpgSQL_condition *cond)
}
for (i = 0; exception_label_map[i].label != NULL; i++)
{
if (pg_strcasecmp(condname, exception_label_map[i].label) == 0)
if (strcmp(condname, exception_label_map[i].label) == 0)
{
int labelerrcode = exception_label_map[i].sqlerrstate;
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册