Skip to content

Commit d0dd5c7

Browse files
committed
Fix check_exclusion_constraint() to insert correct collations in ScanKeys.
1 parent 87f2ad1 commit d0dd5c7

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/backend/executor/execUtils.c

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,6 +1158,7 @@ check_exclusion_constraint(Relation heap, Relation index, IndexInfo *indexInfo,
11581158
{
11591159
Oid *constr_procs = indexInfo->ii_ExclusionProcs;
11601160
uint16 *constr_strats = indexInfo->ii_ExclusionStrats;
1161+
Oid *index_collations = index->rd_indcollation;
11611162
int index_natts = index->rd_index->indnatts;
11621163
IndexScanDesc index_scan;
11631164
HeapTuple tup;
@@ -1188,11 +1189,14 @@ check_exclusion_constraint(Relation heap, Relation index, IndexInfo *indexInfo,
11881189

11891190
for (i = 0; i < index_natts; i++)
11901191
{
1191-
ScanKeyInit(&scankeys[i],
1192-
i + 1,
1193-
constr_strats[i],
1194-
constr_procs[i],
1195-
values[i]);
1192+
ScanKeyEntryInitialize(&scankeys[i],
1193+
0,
1194+
i + 1,
1195+
constr_strats[i],
1196+
InvalidOid,
1197+
index_collations[i],
1198+
constr_procs[i],
1199+
values[i]);
11961200
}
11971201

11981202
/*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy