mirror of
https://github.com/postgres/postgres.git
synced 2025-06-29 10:41:53 +03:00
Fix check_exclusion_constraint() to insert correct collations in ScanKeys.
This commit is contained in:
@ -1158,6 +1158,7 @@ check_exclusion_constraint(Relation heap, Relation index, IndexInfo *indexInfo,
|
|||||||
{
|
{
|
||||||
Oid *constr_procs = indexInfo->ii_ExclusionProcs;
|
Oid *constr_procs = indexInfo->ii_ExclusionProcs;
|
||||||
uint16 *constr_strats = indexInfo->ii_ExclusionStrats;
|
uint16 *constr_strats = indexInfo->ii_ExclusionStrats;
|
||||||
|
Oid *index_collations = index->rd_indcollation;
|
||||||
int index_natts = index->rd_index->indnatts;
|
int index_natts = index->rd_index->indnatts;
|
||||||
IndexScanDesc index_scan;
|
IndexScanDesc index_scan;
|
||||||
HeapTuple tup;
|
HeapTuple tup;
|
||||||
@ -1188,9 +1189,12 @@ check_exclusion_constraint(Relation heap, Relation index, IndexInfo *indexInfo,
|
|||||||
|
|
||||||
for (i = 0; i < index_natts; i++)
|
for (i = 0; i < index_natts; i++)
|
||||||
{
|
{
|
||||||
ScanKeyInit(&scankeys[i],
|
ScanKeyEntryInitialize(&scankeys[i],
|
||||||
|
0,
|
||||||
i + 1,
|
i + 1,
|
||||||
constr_strats[i],
|
constr_strats[i],
|
||||||
|
InvalidOid,
|
||||||
|
index_collations[i],
|
||||||
constr_procs[i],
|
constr_procs[i],
|
||||||
values[i]);
|
values[i]);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user