Fix oversight in pts_error_callback()
От | Qingqing Zhou |
---|---|
Тема | Fix oversight in pts_error_callback() |
Дата | |
Msg-id | dd9gld$2e0u$1@news.hub.org обсуждение исходный текст |
Ответы |
Re: Fix oversight in pts_error_callback()
|
Список | pgsql-patches |
Since we will invoke callback functions unconditionally in errfinish(), so pts_error_callback() should not report "invalid type name" without checking current error status. Regards, Qingqing Index: src/backend/parser/parse_type.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/parser/parse_type.c,v retrieving revision 1.76 diff -c -r1.76 parse_type.c *** src/backend/parser/parse_type.c 1 Aug 2005 20:31:10 -0000 1.76 --- src/backend/parser/parse_type.c 9 Aug 2005 05:53:08 -0000 *************** *** 359,373 **** pts_error_callback(void *arg) { const char *str = (const char *) arg; ! ! errcontext("invalid type name \"%s\"", str); /* * Currently we just suppress any syntax error position report, rather * than transforming to an "internal query" error. It's unlikely that * a type name is complex enough to need positioning. */ ! errposition(0); } /* --- 359,379 ---- pts_error_callback(void *arg) { const char *str = (const char *) arg; ! int syntaxerrposition; /* * Currently we just suppress any syntax error position report, rather * than transforming to an "internal query" error. It's unlikely that * a type name is complex enough to need positioning. */ ! syntaxerrposition = geterrposition(); ! if (syntaxerrposition > 0) ! { ! errcontext("invalid type name \"%s\"", str); ! errposition(0); ! } ! else ! errcontext("parse type string \"%s\"", str); } /*
В списке pgsql-patches по дате отправления: