summaryrefslogtreecommitdiff
path: root/src/backend/executor/execUtils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/executor/execUtils.c')
-rw-r--r--src/backend/executor/execUtils.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/backend/executor/execUtils.c b/src/backend/executor/execUtils.c
index a6b5048326..32cd88ed07 100644
--- a/src/backend/executor/execUtils.c
+++ b/src/backend/executor/execUtils.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.81 2002/05/12 20:10:02 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.82 2002/05/24 18:57:56 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -599,7 +599,7 @@ void
ExecInsertIndexTuples(TupleTableSlot *slot,
ItemPointer tupleid,
EState *estate,
- bool is_update)
+ bool is_vacuum)
{
HeapTuple heapTuple;
ResultRelInfo *resultRelInfo;
@@ -667,11 +667,17 @@ ExecInsertIndexTuples(TupleTableSlot *slot,
datum,
nullv);
+ /*
+ * The index AM does the rest. Note we suppress unique-index
+ * checks if we are being called from VACUUM, since VACUUM may
+ * need to move dead tuples that have the same keys as live ones.
+ */
result = index_insert(relationDescs[i], /* index relation */
datum, /* array of heaptuple Datums */
nullv, /* info on nulls */
&(heapTuple->t_self), /* tid of heap tuple */
- heapRelation);
+ heapRelation,
+ relationDescs[i]->rd_uniqueindex && !is_vacuum);
/*
* keep track of index inserts for debugging