pgsql: Improve parser error location for cases where an INSERT or UPDATE

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Improve parser error location for cases where an INSERT or UPDATE
Date: 2008-10-07 01:47:55
Message-ID: 20081007014755.2577A7545A4@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
Improve parser error location for cases where an INSERT or UPDATE command
supplies an expression that can't be coerced to the target column type.
The code previously attempted to point at the target column name, which
doesn't work at all in an INSERT with omitted column name list, and is
also not remarkably helpful when the problem is buried somewhere in a
long INSERT-multi-VALUES command. Make it point at the failed expression
instead.

Modified Files:
--------------
pgsql/src/backend/parser:
analyze.c (r1.381 -> r1.382)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/analyze.c?r1=1.381&r2=1.382)
parse_target.c (r1.167 -> r1.168)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/parser/parse_target.c?r1=1.167&r2=1.168)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2008-10-07 11:15:41 pgsql: When a relation is moved to another tablespace, we can't assume
Previous Message User Itagaki 2008-10-07 01:35:49 orafce - orafce: Add bitand() and fix regression tests.