Skip to content

Commit 8a7cfa3

Browse files
committed
Lock on the rule relation wasn't removed after adding the comment.
Added Tom's patch fix for heap_close. Rod Taylor
1 parent 0215dc9 commit 8a7cfa3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/commands/comment.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Copyright (c) 1996-2001, PostgreSQL Global Development Group
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/comment.c,v 1.60 2002/09/04 20:31:14 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/comment.c,v 1.61 2002/10/09 16:26:46 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -559,7 +559,6 @@ CommentRule(List *qualname, char *comment)
559559
}
560560

561561
/* Check object security */
562-
563562
aclcheck = pg_class_aclcheck(reloid, GetUserId(), ACL_RULE);
564563
if (aclcheck != ACLCHECK_OK)
565564
aclcheck_error(aclcheck, rulename);
@@ -568,8 +567,9 @@ CommentRule(List *qualname, char *comment)
568567
classoid = get_system_catalog_relid(RewriteRelationName);
569568

570569
/* Call CreateComments() to create/drop the comments */
571-
572570
CreateComments(ruleoid, classoid, 0, comment);
571+
572+
heap_close(relation, NoLock);
573573
}
574574

575575
/*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy