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)
commitd5a798eb0aaf9d9d8ea5f55c688dbfd858809081
tree215ffc657090ba14229967af68df4c5f28aaeae0
parent3a19099dd8afda0479384a10d666b93a26ebf9eb
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