Improve parser error location for cases where an INSERT or UPDATE command
commitbda4b1f0a127fc89189e0ce789b39636679bc4c4
authortgl <tgl>
Tue, 7 Oct 2008 01:47:55 +0000 (7 01:47 +0000)
committertgl <tgl>
Tue, 7 Oct 2008 01:47:55 +0000 (7 01:47 +0000)
tree9d3bcd673158482b5191cf455287d2600dfe8ceb
parent6e7861f7b7676663000abafcd45800e21abb786e
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.
src/backend/parser/analyze.c
src/backend/parser/parse_target.c