Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit750549d

Browse files
committed
Add Assert() to check for trying to heap_close a relation when the
relcache entry's reference count is zero.
1 parent1e091ad commit750549d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎src/include/utils/rel.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: rel.h,v 1.34 2000/01/31 04:35:57 tgl Exp $
10+
* $Id: rel.h,v 1.35 2000/02/27 07:31:00 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -149,7 +149,9 @@ typedef Relation *RelationPtr;
149149
* RelationDecrementReferenceCount
150150
*Decrements relation reference count.
151151
*/
152-
#defineRelationDecrementReferenceCount(relation) ((relation)->rd_refcnt -= 1)
152+
#defineRelationDecrementReferenceCount(relation) \
153+
(AssertMacro((relation)->rd_refcnt > 0), \
154+
(relation)->rd_refcnt -= 1)
153155

154156
/*
155157
* RelationGetForm

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp