From 918854cc08868d569aad3bdf2529fc61c66ecde5 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 18 Apr 2011 15:31:52 -0400 Subject: Fix handling of collations in multi-row VALUES constructs. Per spec we ought to apply select_common_collation() across the expressions in each column of the VALUES table. The original coding was just taking the first row and assuming it was representative. This patch adds a field to struct RangeTblEntry to carry the resolved collations, so initdb is forced for changes in stored rule representation. --- src/backend/optimizer/plan/setrefs.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/backend/optimizer/plan/setrefs.c') diff --git a/src/backend/optimizer/plan/setrefs.c b/src/backend/optimizer/plan/setrefs.c index 432d6483be1..60a1484c992 100644 --- a/src/backend/optimizer/plan/setrefs.c +++ b/src/backend/optimizer/plan/setrefs.c @@ -216,6 +216,7 @@ set_plan_references(PlannerGlobal *glob, Plan *plan, newrte->funccoltypmods = NIL; newrte->funccolcollations = NIL; newrte->values_lists = NIL; + newrte->values_collations = NIL; newrte->ctecoltypes = NIL; newrte->ctecoltypmods = NIL; newrte->ctecolcollations = NIL; -- cgit v1.2.3