Lock on the rule relation wasn't removed after adding the comment.
authorBruce Momjian <[email protected]>
Wed, 9 Oct 2002 16:26:46 +0000 (16:26 +0000)
committerBruce Momjian <[email protected]>
Wed, 9 Oct 2002 16:26:46 +0000 (16:26 +0000)
Added Tom's patch fix for heap_close.

Rod Taylor

src/backend/commands/comment.c

index 9a9e5f2ceb3d48d71d6a669c495ad889d469ed93..908f99ea11a03fac35472eedd365d2436fcd6d75 100644 (file)
@@ -559,7 +559,6 @@ CommentRule(List *qualname, char *comment)
        }
 
        /* Check object security */
-
        aclcheck = pg_class_aclcheck(reloid, GetUserId(), ACL_RULE);
        if (aclcheck != ACLCHECK_OK)
                aclcheck_error(aclcheck, rulename);
@@ -568,8 +567,9 @@ CommentRule(List *qualname, char *comment)
        classoid = get_system_catalog_relid(RewriteRelationName);
 
        /* Call CreateComments() to create/drop the comments */
-
        CreateComments(ruleoid, classoid, 0, comment);
+
+       heap_close(relation, NoLock);
 }
 
 /*