]> granicus.if.org Git - postgresql/commit
Extend the parser location infrastructure to include a location field in
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 28 Aug 2008 23:09:48 +0000 (23:09 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 28 Aug 2008 23:09:48 +0000 (23:09 +0000)
commita2794623d292f7bbfe3134d1407281055acce584
tree106758200708577aaac72ed926f0f4faa3cda36c
parent6734182c169a1ecb74dd8495004e896ee4519adb
Extend the parser location infrastructure to include a location field in
most node types used in expression trees (both before and after parse
analysis).  This allows us to place an error cursor in many situations
where we formerly could not, because the information wasn't available
beyond the very first level of parse analysis.  There's a fair amount
of work still to be done to persuade individual ereport() calls to actually
include an error location, but this gets the initdb-forcing part of the
work out of the way; and the situation is already markedly better than
before for complaints about unimplementable implicit casts, such as
CASE and UNION constructs with incompatible alternative data types.
Per my proposal of a few days ago.
44 files changed:
src/backend/catalog/heap.c
src/backend/commands/prepare.c
src/backend/commands/tablecmds.c
src/backend/commands/typecmds.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/makefuncs.c
src/backend/nodes/nodeFuncs.c
src/backend/nodes/outfuncs.c
src/backend/nodes/readfuncs.c
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/plan/subselect.c
src/backend/optimizer/prep/prepqual.c
src/backend/optimizer/prep/preptlist.c
src/backend/optimizer/prep/prepunion.c
src/backend/optimizer/util/clauses.c
src/backend/optimizer/util/var.c
src/backend/parser/analyze.c
src/backend/parser/gram.y
src/backend/parser/parse_agg.c
src/backend/parser/parse_clause.c
src/backend/parser/parse_coerce.c
src/backend/parser/parse_expr.c
src/backend/parser/parse_func.c
src/backend/parser/parse_node.c
src/backend/parser/parse_oper.c
src/backend/parser/parse_relation.c
src/backend/parser/parse_target.c
src/backend/parser/parse_utilcmd.c
src/backend/rewrite/rewriteHandler.c
src/backend/rewrite/rewriteManip.c
src/include/catalog/catversion.h
src/include/nodes/makefuncs.h
src/include/nodes/nodeFuncs.h
src/include/nodes/parsenodes.h
src/include/nodes/primnodes.h
src/include/parser/parse_coerce.h
src/include/parser/parse_node.h
src/test/regress/expected/arrays.out
src/test/regress/expected/select_implicit.out
src/test/regress/expected/select_implicit_1.out
src/test/regress/expected/select_implicit_2.out
src/test/regress/expected/xml.out
src/test/regress/expected/xml_1.out