diff options
author | Teodor Sigaev <teodor@sigaev.ru> | 2016-04-08 21:52:13 +0300 |
---|---|---|
committer | Teodor Sigaev <teodor@sigaev.ru> | 2016-04-08 21:52:13 +0300 |
commit | 8b99edefcab1e82c43139a2c7dc06d31fb27b3e4 (patch) | |
tree | 5428925d16447c4d204e0956e6d2ae1032847585 /src/backend/executor/execIndexing.c | |
parent | 35e2e357cb054dc9e5d890fe754c56f0722f015e (diff) | |
download | postgresql-8b99edefcab1e82c43139a2c7dc06d31fb27b3e4.tar.gz postgresql-8b99edefcab1e82c43139a2c7dc06d31fb27b3e4.zip |
Revert CREATE INDEX ... INCLUDING ...
It's not ready yet, revert two commits
690c543550b0d2852060c18d270cdb534d339d9a - unstable test output
386e3d7609c49505e079c40c65919d99feb82505 - patch itself
Diffstat (limited to 'src/backend/executor/execIndexing.c')
-rw-r--r-- | src/backend/executor/execIndexing.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/backend/executor/execIndexing.c b/src/backend/executor/execIndexing.c index ecd2723f0b6..5d553d51d21 100644 --- a/src/backend/executor/execIndexing.c +++ b/src/backend/executor/execIndexing.c @@ -646,7 +646,7 @@ check_exclusion_or_unique_constraint(Relation heap, Relation index, Oid *constr_procs; uint16 *constr_strats; Oid *index_collations = index->rd_indcollation; - int indnkeyatts = IndexRelationGetNumberOfKeyAttributes(index); + int index_natts = index->rd_index->indnatts; IndexScanDesc index_scan; HeapTuple tup; ScanKeyData scankeys[INDEX_MAX_KEYS]; @@ -673,7 +673,7 @@ check_exclusion_or_unique_constraint(Relation heap, Relation index, * If any of the input values are NULL, the constraint check is assumed to * pass (i.e., we assume the operators are strict). */ - for (i = 0; i < indnkeyatts; i++) + for (i = 0; i < index_natts; i++) { if (isnull[i]) return true; @@ -685,7 +685,7 @@ check_exclusion_or_unique_constraint(Relation heap, Relation index, */ InitDirtySnapshot(DirtySnapshot); - for (i = 0; i < indnkeyatts; i++) + for (i = 0; i < index_natts; i++) { ScanKeyEntryInitialize(&scankeys[i], 0, @@ -717,8 +717,8 @@ check_exclusion_or_unique_constraint(Relation heap, Relation index, retry: conflict = false; found_self = false; - index_scan = index_beginscan(heap, index, &DirtySnapshot, indnkeyatts, 0); - index_rescan(index_scan, scankeys, indnkeyatts, NULL, 0); + index_scan = index_beginscan(heap, index, &DirtySnapshot, index_natts, 0); + index_rescan(index_scan, scankeys, index_natts, NULL, 0); while ((tup = index_getnext(index_scan, ForwardScanDirection)) != NULL) @@ -879,10 +879,10 @@ index_recheck_constraint(Relation index, Oid *constr_procs, Datum *existing_values, bool *existing_isnull, Datum *new_values) { - int indnkeyatts = IndexRelationGetNumberOfKeyAttributes(index); + int index_natts = index->rd_index->indnatts; int i; - for (i = 0; i < indnkeyatts; i++) + for (i = 0; i < index_natts; i++) { /* Assume the exclusion operators are strict */ if (existing_isnull[i]) |