From 959e61e917a802074e257d4bec13ee04ab4822ff Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 21 May 2002 22:05:55 +0000 Subject: Remove global variable scanCommandId in favor of storing a command ID in snapshots, per my proposal of a few days ago. Also, tweak heapam.c routines (heap_insert, heap_update, heap_delete, heap_mark4update) to be passed the command ID to use, instead of doing GetCurrentCommandID. For catalog updates they'll still get passed current command ID, but for updates generated from the main executor they'll get passed the command ID saved in the snapshot the query is using. This should fix some corner cases associated with functions and triggers that advance current command ID while an outer query is still in progress. --- src/backend/commands/user.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/backend/commands/user.c') diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c index c7c3da9dd42..98f47dd98bb 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 -- cgit v1.2.3