diff options
| author | Tom Lane | 2011-03-26 18:25:48 +0000 |
|---|---|---|
| committer | Tom Lane | 2011-03-26 18:25:48 +0000 |
| commit | b23c9fa9293c54a3829093d207be37a7b42cb630 (patch) | |
| tree | 4bc1df3cf95ef9b75c9ac1f85ad57eed32db4889 /src/backend/optimizer/util/predtest.c | |
| parent | 92f4786fa9b730fd12cbfe973eb96addc6e98924 (diff) | |
Clean up a few failures to set collation fields in expression nodes.
I'm not sure these have any non-cosmetic implications, but I'm not sure
they don't, either. In particular, ensure the CaseTestExpr generated
by transformAssignmentIndirection to represent the base target column
carries the correct collation, because parse_collate.c won't fix that.
Tweak lsyscache.c API so that we can get the appropriate collation
without an extra syscache lookup.
Diffstat (limited to 'src/backend/optimizer/util/predtest.c')
| -rw-r--r-- | src/backend/optimizer/util/predtest.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/backend/optimizer/util/predtest.c b/src/backend/optimizer/util/predtest.c index 6a1f7291ba5..72fd3e4ca71 100644 --- a/src/backend/optimizer/util/predtest.c +++ b/src/backend/optimizer/util/predtest.c @@ -906,6 +906,8 @@ arrayconst_startup_fn(Node *clause, PredIterInfo info) state->opexpr.opfuncid = saop->opfuncid; state->opexpr.opresulttype = BOOLOID; state->opexpr.opretset = false; + state->opexpr.opcollid = InvalidOid; + state->opexpr.inputcollid = saop->inputcollid; state->opexpr.args = list_copy(saop->args); /* Set up a dummy Const node to hold the per-element values */ @@ -972,6 +974,8 @@ arrayexpr_startup_fn(Node *clause, PredIterInfo info) state->opexpr.opfuncid = saop->opfuncid; state->opexpr.opresulttype = BOOLOID; state->opexpr.opretset = false; + state->opexpr.opcollid = InvalidOid; + state->opexpr.inputcollid = saop->inputcollid; state->opexpr.args = list_copy(saop->args); /* Initialize iteration variable to first member of ArrayExpr */ |
