mirror of
https://github.com/postgres/postgres.git
synced 2025-08-19 23:22:23 +03:00
Revert: Let table AM insertion methods control index insertion
This commit reverts b1484a3f19
per review by Andres Freund.
Discussion: https://postgr.es/m/20240410165236.rwyrny7ihi4ddxw4%40awork3.anarazel.de
This commit is contained in:
@@ -509,7 +509,6 @@ ExecSimpleRelationInsert(ResultRelInfo *resultRelInfo,
|
||||
if (!skip_tuple)
|
||||
{
|
||||
List *recheckIndexes = NIL;
|
||||
bool insertIndexes;
|
||||
|
||||
/* Compute stored generated columns */
|
||||
if (rel->rd_att->constr &&
|
||||
@@ -524,10 +523,9 @@ ExecSimpleRelationInsert(ResultRelInfo *resultRelInfo,
|
||||
ExecPartitionCheck(resultRelInfo, slot, estate, true);
|
||||
|
||||
/* OK, store the tuple and create index entries for it */
|
||||
simple_table_tuple_insert(resultRelInfo->ri_RelationDesc, slot,
|
||||
&insertIndexes);
|
||||
simple_table_tuple_insert(resultRelInfo->ri_RelationDesc, slot);
|
||||
|
||||
if (insertIndexes && resultRelInfo->ri_NumIndices > 0)
|
||||
if (resultRelInfo->ri_NumIndices > 0)
|
||||
recheckIndexes = ExecInsertIndexTuples(resultRelInfo,
|
||||
slot, estate, false, false,
|
||||
NULL, NIL, false);
|
||||
|
Reference in New Issue
Block a user