]> granicus.if.org Git - postgresql/commit
Pass collation to makeConst() instead of looking it up internally.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 26 Mar 2011 00:10:42 +0000 (20:10 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 26 Mar 2011 00:10:42 +0000 (20:10 -0400)
commitbfa4440ca5d948c4d4f0ab5bb82d433200c35288
tree729b839f5f03c46773250ce3d33fc351f394e63e
parentc8e993503d0f1a0cb8f187a136fb64cead9ba591
Pass collation to makeConst() instead of looking it up internally.

In nearly all cases, the caller already knows the correct collation, and
in a number of places, the value the caller has handy is more correct than
the default for the type would be.  (In particular, this patch makes it
significantly less likely that eval_const_expressions will result in
changing the exposed collation of an expression.)  So an internal lookup
is both expensive and wrong.
18 files changed:
src/backend/commands/tablecmds.c
src/backend/executor/execQual.c
src/backend/executor/functions.c
src/backend/nodes/makefuncs.c
src/backend/optimizer/path/indxpath.c
src/backend/optimizer/plan/planagg.c
src/backend/optimizer/prep/preptlist.c
src/backend/optimizer/prep/prepunion.c
src/backend/optimizer/util/clauses.c
src/backend/parser/parse_coerce.c
src/backend/parser/parse_node.c
src/backend/parser/parse_relation.c
src/backend/parser/parse_target.c
src/backend/rewrite/rewriteHandler.c
src/backend/rewrite/rewriteManip.c
src/backend/utils/adt/selfuncs.c
src/backend/utils/cache/lsyscache.c
src/include/nodes/makefuncs.h