From 3908473c809d5c24940faebfabdad673f4302178 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Wed, 8 Nov 2000 22:10:03 +0000 Subject: Make DROP TABLE rollback-able: postpone physical file delete until commit. (WAL logging for this is not done yet, however.) Clean up a number of really crufty things that are no longer needed now that DROP behaves nicely. Make temp table mapper do the right things when drop or rename affecting a temp table is rolled back. Also, remove "relation modified while in use" error check, in favor of locking tables at first reference and holding that lock throughout the statement. --- src/backend/commands/comment.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/backend/commands/comment.c') diff --git a/src/backend/commands/comment.c b/src/backend/commands/comment.c index 6dd3c4dfab..bff2b897c6 100644 --- a/src/backend/commands/comment.c +++ b/src/backend/commands/comment.c @@ -356,10 +356,8 @@ CommentAttribute(char *relname, char *attrname, char *comment) attrtuple = SearchSysCacheTuple(ATTNAME, ObjectIdGetDatum(relation->rd_id), PointerGetDatum(attrname), 0, 0); if (!HeapTupleIsValid(attrtuple)) - { elog(ERROR, "'%s' is not an attribute of class '%s'", attrname, relname); - } oid = attrtuple->t_data->t_oid; /*** Call CreateComments() to create/drop the comments ***/ @@ -368,8 +366,7 @@ CommentAttribute(char *relname, char *attrname, char *comment) /*** Now, close the heap relation and return ***/ - heap_close(relation, AccessShareLock); - + heap_close(relation, NoLock); } /*------------------------------------------------------------------ @@ -840,6 +837,5 @@ CommentTrigger(char *trigger, char *relname, char *comment) heap_endscan(scan); heap_close(pg_trigger, AccessShareLock); - heap_close(relation, AccessShareLock); - + heap_close(relation, NoLock); } -- cgit v1.2.1