diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2001-01-23 04:32:23 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2001-01-23 04:32:23 +0000 |
commit | 786f1a59cd44f890b2423e15ba3ab172dab968bf (patch) | |
tree | 30a730a13a351ac02264f7f48ab6145eb7c51e17 /src/backend/commands/creatinh.c | |
parent | 7a2a1acd520761b479c9dfc4a8e573aeec626094 (diff) | |
download | postgresql-786f1a59cd44f890b2423e15ba3ab172dab968bf.tar.gz postgresql-786f1a59cd44f890b2423e15ba3ab172dab968bf.zip |
Fix all the places that called heap_update() and heap_delete() without
bothering to check the return value --- which meant that in case the
update or delete failed because of a concurrent update, you'd not find
out about it, except by observing later that the transaction produced
the wrong outcome. There are now subroutines simple_heap_update and
simple_heap_delete that should be used anyplace that you're not prepared
to do the full nine yards of coping with concurrent updates. In
practice, that seems to mean absolutely everywhere but the executor,
because *noplace* else was checking.
Diffstat (limited to 'src/backend/commands/creatinh.c')
-rw-r--r-- | src/backend/commands/creatinh.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/commands/creatinh.c b/src/backend/commands/creatinh.c index 22a34d2e5a3..b9284604e72 100644 --- a/src/backend/commands/creatinh.c +++ b/src/backend/commands/creatinh.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.70 2001/01/05 02:58:16 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.71 2001/01/23 04:32:21 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -771,7 +771,7 @@ setRelhassubclassInRelation(Oid relationId, bool relhassubclass) elog(ERROR, "setRelhassubclassInRelation: cache lookup failed for relation %u", relationId); ((Form_pg_class) GETSTRUCT(tuple))->relhassubclass = relhassubclass; - heap_update(relationRelation, &tuple->t_self, tuple, NULL); + simple_heap_update(relationRelation, &tuple->t_self, tuple); /* keep the catalog indices up to date */ CatalogOpenIndices(Num_pg_class_indices, Name_pg_class_indices, idescs); |