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

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

From
tgl@postgresql.org (Tom Lane)
Date:
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)