summaryrefslogtreecommitdiff
path: root/src/backend/commands
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/commands')
-rw-r--r--src/backend/commands/analyze.c4
-rw-r--r--src/backend/commands/async.c4
-rw-r--r--src/backend/commands/cluster.c4
-rw-r--r--src/backend/commands/comment.c4
-rw-r--r--src/backend/commands/copy.c4
-rw-r--r--src/backend/commands/dbcommands.c4
-rw-r--r--src/backend/commands/portalcmds.c16
-rw-r--r--src/backend/commands/proclang.c4
-rw-r--r--src/backend/commands/sequence.c4
-rw-r--r--src/backend/commands/tablecmds.c9
-rw-r--r--src/backend/commands/trigger.c7
-rw-r--r--src/backend/commands/user.c8
12 files changed, 30 insertions, 42 deletions
diff --git a/src/backend/commands/analyze.c b/src/backend/commands/analyze.c
index c015043843..3f5cc96f41 100644
--- a/src/backend/commands/analyze.c
+++ b/src/backend/commands/analyze.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.33 2002/05/20 23:51:42 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/analyze.c,v 1.34 2002/05/21 22:05:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1787,7 +1787,7 @@ update_attstats(Oid relid, int natts, VacAttrStats **vacattrstats)
{
/* No, insert new tuple */
stup = heap_formtuple(sd->rd_att, values, nulls);
- heap_insert(sd, stup);
+ simple_heap_insert(sd, stup);
}
/* update indices too */
diff --git a/src/backend/commands/async.c b/src/backend/commands/async.c
index 271be15119..7ed3663a48 100644
--- a/src/backend/commands/async.c
+++ b/src/backend/commands/async.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.85 2002/05/20 23:51:42 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.86 2002/05/21 22:05:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -242,7 +242,7 @@ Async_Listen(char *relname, int pid)
values[i++] = (Datum) 0; /* no notifies pending */
tuple = heap_formtuple(RelationGetDescr(lRel), values, nulls);
- heap_insert(lRel, tuple);
+ simple_heap_insert(lRel, tuple);
#ifdef NOT_USED /* currently there are no indexes */
if (RelationGetForm(lRel)->relhasindex)
diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c
index a6215cb23f..be60227402 100644
--- a/src/backend/commands/cluster.c
+++ b/src/backend/commands/cluster.c
@@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.80 2002/05/20 23:51:42 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.81 2002/05/21 22:05:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -241,7 +241,7 @@ rebuildheap(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex)
*/
HeapTuple copiedTuple = heap_copytuple(LocalHeapTuple);
- heap_insert(LocalNewHeap, copiedTuple);
+ simple_heap_insert(LocalNewHeap, copiedTuple);
heap_freetuple(copiedTuple);
CHECK_FOR_INTERRUPTS();
diff --git a/src/backend/commands/comment.c b/src/backend/commands/comment.c
index 9d48e33b2c..7286720614 100644
--- a/src/backend/commands/comment.c
+++ b/src/backend/commands/comment.c
@@ -7,7 +7,7 @@
* Copyright (c) 1999-2001, PostgreSQL Global Development Group
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/comment.c,v 1.47 2002/05/20 23:51:42 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/comment.c,v 1.48 2002/05/21 22:05:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -199,7 +199,7 @@ CreateComments(Oid oid, Oid classoid, int32 subid, char *comment)
{
newtuple = heap_formtuple(RelationGetDescr(description),
values, nulls);
- heap_insert(description, newtuple);
+ simple_heap_insert(description, newtuple);
}
/* Update indexes, if necessary */
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c
index 1f9aef8fc0..83ca5b32c5 100644
--- a/src/backend/commands/copy.c
+++ b/src/backend/commands/copy.c
@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.154 2002/05/20 23:51:42 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.155 2002/05/21 22:05:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -947,7 +947,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp,
/*
* OK, store the tuple and create index entries for it
*/
- heap_insert(rel, tuple);
+ simple_heap_insert(rel, tuple);
if (resultRelInfo->ri_NumIndices > 0)
ExecInsertIndexTuples(slot, &(tuple->t_self), estate, false);
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c
index d4bc274ba2..bdba0dacfc 100644
--- a/src/backend/commands/dbcommands.c
+++ b/src/backend/commands/dbcommands.c
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.90 2002/05/20 23:51:42 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.91 2002/05/21 22:05:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -293,7 +293,7 @@ createdb(const char *dbname, const char *dbowner,
tuple->t_data->t_oid = dboid; /* override heap_insert's OID
* selection */
- heap_insert(pg_database_rel, tuple);
+ simple_heap_insert(pg_database_rel, tuple);
/*
* Update indexes
diff --git a/src/backend/commands/portalcmds.c b/src/backend/commands/portalcmds.c
index 6f690c0927..754ea46246 100644
--- a/src/backend/commands/portalcmds.c
+++ b/src/backend/commands/portalcmds.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/portalcmds.c,v 1.1 2002/04/15 05:22:03 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/portalcmds.c,v 1.2 2002/05/21 22:05:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -74,7 +74,6 @@ PerformPortalFetch(char *name,
EState *estate;
MemoryContext oldcontext;
ScanDirection direction;
- CommandId savedId;
bool temp_desc = false;
/* initialize completion status in case of early exit */
@@ -132,14 +131,6 @@ PerformPortalFetch(char *name,
}
/*
- * Restore the scanCommandId that was current when the cursor was
- * opened. This ensures that we see the same tuples throughout the
- * execution of the cursor.
- */
- savedId = GetScanCommandId();
- SetScanCommandId(PortalGetCommandId(portal));
-
- /*
* Determine which direction to go in, and check to see if we're
* already at the end of the available tuples in that direction. If
* so, set the direction to NoMovement to avoid trying to fetch any
@@ -186,11 +177,6 @@ PerformPortalFetch(char *name,
estate->es_processed);
/*
- * Restore outer command ID.
- */
- SetScanCommandId(savedId);
-
- /*
* Clean up and switch back to old context.
*/
if (temp_desc)
diff --git a/src/backend/commands/proclang.c b/src/backend/commands/proclang.c
index 2ad25fdbd4..6cabbf0ec1 100644
--- a/src/backend/commands/proclang.c
+++ b/src/backend/commands/proclang.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/proclang.c,v 1.31 2002/04/15 05:22:03 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/proclang.c,v 1.32 2002/05/21 22:05:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -102,7 +102,7 @@ CreateProceduralLanguage(CreatePLangStmt *stmt)
tupDesc = rel->rd_att;
tup = heap_formtuple(tupDesc, values, nulls);
- heap_insert(rel, tup);
+ simple_heap_insert(rel, tup);
if (RelationGetForm(rel)->relhasindex)
{
diff --git a/src/backend/commands/sequence.c b/src/backend/commands/sequence.c
index 0fa56fcfb7..c79e6f97e1 100644
--- a/src/backend/commands/sequence.c
+++ b/src/backend/commands/sequence.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/sequence.c,v 1.77 2002/04/15 05:22:03 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/sequence.c,v 1.78 2002/05/21 22:05:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -197,7 +197,7 @@ DefineSequence(CreateSeqStmt *seq)
/* Now form & insert sequence tuple */
tuple = heap_formtuple(tupDesc, value, null);
- heap_insert(rel, tuple);
+ simple_heap_insert(rel, tuple);
Assert(ItemPointerGetOffsetNumber(&(tuple->t_self)) == FirstOffsetNumber);
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index f2bbdb0107..aff1590f11 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.15 2002/05/20 23:51:42 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/tablecmds.c,v 1.16 2002/05/21 22:05:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -821,7 +821,7 @@ StoreCatalogInheritance(Oid relationId, List *supers)
tuple = heap_formtuple(desc, datum, nullarr);
- heap_insert(relation, tuple);
+ simple_heap_insert(relation, tuple);
if (RelationGetForm(relation)->relhasindex)
{
@@ -1673,7 +1673,7 @@ AlterTableAddColumn(Oid myrelid,
ReleaseSysCache(typeTuple);
- heap_insert(attrdesc, attributeTuple);
+ simple_heap_insert(attrdesc, attributeTuple);
/* Update indexes on pg_attribute */
if (RelationGetForm(attrdesc)->relhasindex)
@@ -2890,7 +2890,8 @@ AlterTableCreateToastTable(Oid relOid, bool silent)
classtuple.t_self = reltup->t_self;
ReleaseSysCache(reltup);
- switch (heap_mark4update(class_rel, &classtuple, &buffer))
+ switch (heap_mark4update(class_rel, &classtuple, &buffer,
+ GetCurrentCommandId()))
{
case HeapTupleSelfUpdated:
case HeapTupleMayBeUpdated:
diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c
index a871c85788..e0b01b6fee 100644
--- a/src/backend/commands/trigger.c
+++ b/src/backend/commands/trigger.c
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.117 2002/04/30 01:24:57 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/trigger.c,v 1.118 2002/05/21 22:05:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -270,7 +270,7 @@ CreateTrigger(CreateTrigStmt *stmt)
/*
* Insert tuple into pg_trigger.
*/
- heap_insert(tgrel, tuple);
+ simple_heap_insert(tgrel, tuple);
CatalogOpenIndices(Num_pg_trigger_indices, Name_pg_trigger_indices, idescs);
CatalogIndexInsert(idescs, Num_pg_trigger_indices, tgrel, tuple);
CatalogCloseIndices(Num_pg_trigger_indices, idescs);
@@ -1183,7 +1183,8 @@ GetTupleForTrigger(EState *estate, ResultRelInfo *relinfo,
*newSlot = NULL;
tuple.t_self = *tid;
ltrmark:;
- test = heap_mark4update(relation, &tuple, &buffer);
+ test = heap_mark4update(relation, &tuple, &buffer,
+ GetCurrentCommandId());
switch (test)
{
case HeapTupleSelfUpdated:
diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c
index c7c3da9dd4..98f47dd98b 100644
--- a/src/backend/commands/user.c
+++ b/src/backend/commands/user.c
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.102 2002/05/20 23:51:42 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/commands/user.c,v 1.103 2002/05/21 22:05:54 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -596,7 +596,7 @@ CreateUser(CreateUserStmt *stmt)
/*
* Insert new record in the pg_shadow table
*/
- heap_insert(pg_shadow_rel, tuple);
+ simple_heap_insert(pg_shadow_rel, tuple);
/*
* Update indexes
@@ -1213,9 +1213,9 @@ CreateGroup(CreateGroupStmt *stmt)
tuple = heap_formtuple(pg_group_dsc, new_record, new_record_nulls);
/*
- * Insert a new record in the pg_group_table
+ * Insert a new record in the pg_group table
*/
- heap_insert(pg_group_rel, tuple);
+ simple_heap_insert(pg_group_rel, tuple);
/*
* Update indexes