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

Commita9c074b

Browse files
committed
Silence unused variable compiler warning
Fallout fromfcec6ca: mark a variable inset_tablefunc_size_estimates as used for asserts only.Also, the planner_rte_fetch() call is pointless with assertionsdisabled, so enclose it in a USE_ASSERT_CHECKING #ifdef; fix the sameproblem in set_subquery_size_estimates().First problem noted by David Rowley, whose compiler is noisier than minein this regard.
1 parent895e36b commita9c074b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

‎src/backend/optimizer/path/costsize.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4458,8 +4458,10 @@ set_subquery_size_estimates(PlannerInfo *root, RelOptInfo *rel)
44584458

44594459
/* Should only be applied to base relations that are subqueries */
44604460
Assert(rel->relid>0);
4461+
#ifdefUSE_ASSERT_CHECKING
44614462
rte=planner_rt_fetch(rel->relid,root);
44624463
Assert(rte->rtekind==RTE_SUBQUERY);
4464+
#endif
44634465

44644466
/*
44654467
* Copy raw number of output rows from subquery. All of its paths should
@@ -4571,12 +4573,14 @@ set_function_size_estimates(PlannerInfo *root, RelOptInfo *rel)
45714573
void
45724574
set_tablefunc_size_estimates(PlannerInfo*root,RelOptInfo*rel)
45734575
{
4574-
RangeTblEntry*rte;
4576+
RangeTblEntry*rtePG_USED_FOR_ASSERTS_ONLY;
45754577

45764578
/* Should only be applied to base relations that are functions */
45774579
Assert(rel->relid>0);
4580+
#ifdefUSE_ASSERT_CHECKING
45784581
rte=planner_rt_fetch(rel->relid,root);
45794582
Assert(rte->rtekind==RTE_TABLEFUNC);
4583+
#endif
45804584

45814585
rel->tuples=100;
45824586

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp