From d0dd5c73527d4adc11211bd6ad43e3be121842f9 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 27 Mar 2011 13:29:52 -0400 Subject: [PATCH] Fix check_exclusion_constraint() to insert correct collations in ScanKeys. --- src/backend/executor/execUtils.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/backend/executor/execUtils.c b/src/backend/executor/execUtils.c index 6cf692a956..7e84ccdd9c 100644 --- a/src/backend/executor/execUtils.c +++ b/src/backend/executor/execUtils.c @@ -1158,6 +1158,7 @@ check_exclusion_constraint(Relation heap, Relation index, IndexInfo *indexInfo, { Oid *constr_procs = indexInfo->ii_ExclusionProcs; uint16 *constr_strats = indexInfo->ii_ExclusionStrats; + Oid *index_collations = index->rd_indcollation; int index_natts = index->rd_index->indnatts; IndexScanDesc index_scan; HeapTuple tup; @@ -1188,11 +1189,14 @@ check_exclusion_constraint(Relation heap, Relation index, IndexInfo *indexInfo, for (i = 0; i < index_natts; i++) { - ScanKeyInit(&scankeys[i], - i + 1, - constr_strats[i], - constr_procs[i], - values[i]); + ScanKeyEntryInitialize(&scankeys[i], + 0, + i + 1, + constr_strats[i], + InvalidOid, + index_collations[i], + constr_procs[i], + values[i]); } /* -- 2.40.0