]> granicus.if.org Git - postgresql/commit
Create a new expression node type RelabelType, which exists solely to
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 20 Feb 2000 21:32:16 +0000 (21:32 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 20 Feb 2000 21:32:16 +0000 (21:32 +0000)
commit57b30e8e226014c8d06bae0158e0c7fc679f700b
tree172a3052e6c88922d63726bacd092afac6bf053c
parentbd8e071482e3c33876295aae5523fe57ce35025b
Create a new expression node type RelabelType, which exists solely to
represent the result of a binary-compatible type coercion.  At runtime
it just evaluates its argument --- but during type resolution, exprType
will pick up the output type of the RelabelType node instead of the type
of the argument.  This solves some longstanding problems with dropped
type coercions, an example being 'select now()::abstime::int4' which
used to produce date-formatted output, not an integer, because the
coercion to int4 was dropped on the floor.
13 files changed:
src/backend/executor/execQual.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/equalfuncs.c
src/backend/nodes/freefuncs.c
src/backend/nodes/outfuncs.c
src/backend/nodes/readfuncs.c
src/backend/optimizer/util/clauses.c
src/backend/parser/parse_coerce.c
src/backend/parser/parse_expr.c
src/backend/parser/parse_func.c
src/backend/utils/adt/ruleutils.c
src/include/nodes/nodes.h
src/include/nodes/primnodes.h