Skip to content

Commit 2bf99b4

Browse files
committed
Avoid compiler warning in non-assert builds
After 01575ad, expand_single_inheritance_child()'s parentOID variable is read only in an Assert, provoking a compiler warning in non-assert builds. Fix that by marking the variable with PG_USED_FOR_ASSERTS_ONLY. Per report and suggestion from David Rowley Discussion: https://postgr.es/m/CAApHDvpjA_8Wxu4DCTRVAvPxC9atwMe6N%2ByvrcGsgb7mrfdpJA%40mail.gmail.com
1 parent 178ee1d commit 2bf99b4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backend/optimizer/util/inherit.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,8 @@ expand_single_inheritance_child(PlannerInfo *root, RangeTblEntry *parentrte,
457457
Index *childRTindex_p)
458458
{
459459
Query *parse = root->parse;
460-
Oid parentOID = RelationGetRelid(parentrel);
460+
Oid parentOID PG_USED_FOR_ASSERTS_ONLY =
461+
RelationGetRelid(parentrel);
461462
Oid childOID = RelationGetRelid(childrel);
462463
RangeTblEntry *childrte;
463464
Index childRTindex;

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