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

Commit28ae524

Browse files
committed
Quieten warnings about unused variables
These variables are only ever written to in assertion-enabled builds,and the latest Microsoft compilers complain about such variables innon-assertion-enabled builds.Apparently they don't worry so much about variables that are written tobut not read from, so most of our PG_USED_FOR_ASSERTS_ONLY variablesdon't cause the problem.Discussion:https://postgr.es/m/7800.1505950322@sss.pgh.pa.us
1 parent9140cf8 commit28ae524

File tree

1 file changed

+2
-11
lines changed

1 file changed

+2
-11
lines changed

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

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4550,15 +4550,11 @@ set_subquery_size_estimates(PlannerInfo *root, RelOptInfo *rel)
45504550
{
45514551
PlannerInfo*subroot=rel->subroot;
45524552
RelOptInfo*sub_final_rel;
4553-
RangeTblEntry*rtePG_USED_FOR_ASSERTS_ONLY;
45544553
ListCell*lc;
45554554

45564555
/* Should only be applied to base relations that are subqueries */
45574556
Assert(rel->relid>0);
4558-
#ifdefUSE_ASSERT_CHECKING
4559-
rte=planner_rt_fetch(rel->relid,root);
4560-
Assert(rte->rtekind==RTE_SUBQUERY);
4561-
#endif
4557+
Assert(planner_rt_fetch(rel->relid,root)->rtekind==RTE_SUBQUERY);
45624558

45634559
/*
45644560
* Copy raw number of output rows from subquery. All of its paths should
@@ -4670,14 +4666,9 @@ set_function_size_estimates(PlannerInfo *root, RelOptInfo *rel)
46704666
void
46714667
set_tablefunc_size_estimates(PlannerInfo*root,RelOptInfo*rel)
46724668
{
4673-
RangeTblEntry*rtePG_USED_FOR_ASSERTS_ONLY;
4674-
46754669
/* Should only be applied to base relations that are functions */
46764670
Assert(rel->relid>0);
4677-
#ifdefUSE_ASSERT_CHECKING
4678-
rte=planner_rt_fetch(rel->relid,root);
4679-
Assert(rte->rtekind==RTE_TABLEFUNC);
4680-
#endif
4671+
Assert(planner_rt_fetch(rel->relid,root)->rtekind==RTE_TABLEFUNC);
46814672

46824673
rel->tuples=100;
46834674

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp