summaryrefslogtreecommitdiff
path: root/src/backend/parser
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2004-03-21 22:29:11 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2004-03-21 22:29:11 +0000
commitf938c2b91bebb7f436a3615cf86347d7261f71e8 (patch)
tree012d53c3414a88b0d35a4210becbcadf3b81a09c /src/backend/parser
parentbee3b2a0a01eab4b9e8d795fd2e3b5515bf22df3 (diff)
Revise syntax-error reporting behavior to give pleasant results for
errors in internally-generated queries, such as those submitted by plpgsql functions. Per recent discussions with Fabien Coelho.
Diffstat (limited to 'src/backend/parser')
-rw-r--r--src/backend/parser/parse_type.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/backend/parser/parse_type.c b/src/backend/parser/parse_type.c
index 7695bc49e51..e6e8b00cda4 100644
--- a/src/backend/parser/parse_type.c
+++ b/src/backend/parser/parse_type.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/parser/parse_type.c,v 1.64 2003/11/29 19:51:52 pgsql Exp $
+ * $PostgreSQL: pgsql/src/backend/parser/parse_type.c,v 1.65 2004/03/21 22:29:11 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -439,6 +439,12 @@ 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);
}
/*