]> granicus.if.org Git - postgresql/commit
Improve parser error location for cases where an INSERT or UPDATE command
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 7 Oct 2008 01:47:55 +0000 (01:47 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 7 Oct 2008 01:47:55 +0000 (01:47 +0000)
commit078aaf796eda274cd6cd241331278d4f089a6d7e
tree4c6864ed540927fb088aae746661acce99975feb
parenta6586c0dc1f6d278f9932c90595828bf3d37f7d3
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