Commit 8a7cfa37 authored by Bruce Momjian's avatar Bruce Momjian

Lock on the rule relation wasn't removed after adding the comment.

Added Tom's patch fix for heap_close.

Rod Taylor
parent 0215dc9b
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
* Copyright (c) 1996-2001, PostgreSQL Global Development Group * Copyright (c) 1996-2001, PostgreSQL Global Development Group
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/commands/comment.c,v 1.60 2002/09/04 20:31:14 momjian Exp $ * $Header: /cvsroot/pgsql/src/backend/commands/comment.c,v 1.61 2002/10/09 16:26:46 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -559,7 +559,6 @@ CommentRule(List *qualname, char *comment) ...@@ -559,7 +559,6 @@ CommentRule(List *qualname, char *comment)
} }
/* Check object security */ /* Check object security */
aclcheck = pg_class_aclcheck(reloid, GetUserId(), ACL_RULE); aclcheck = pg_class_aclcheck(reloid, GetUserId(), ACL_RULE);
if (aclcheck != ACLCHECK_OK) if (aclcheck != ACLCHECK_OK)
aclcheck_error(aclcheck, rulename); aclcheck_error(aclcheck, rulename);
...@@ -568,8 +567,9 @@ CommentRule(List *qualname, char *comment) ...@@ -568,8 +567,9 @@ CommentRule(List *qualname, char *comment)
classoid = get_system_catalog_relid(RewriteRelationName); classoid = get_system_catalog_relid(RewriteRelationName);
/* Call CreateComments() to create/drop the comments */ /* Call CreateComments() to create/drop the comments */
CreateComments(ruleoid, classoid, 0, comment); CreateComments(ruleoid, classoid, 0, comment);
heap_close(relation, NoLock);
} }
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment