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 in non-assertion-enabled builds. Apparently they don't worry so much about variables that are written to but not read from, so most of our PG_USED_FOR_ASSERTS_ONLY variables don't cause the problem. Discussion: https://postgr.es/m/7800.1505950322@sss.pgh.pa.us
This commit is contained in:
parent
9140cf8269
commit
28ae524bbf
@ -4550,15 +4550,11 @@ set_subquery_size_estimates(PlannerInfo *root, RelOptInfo *rel)
|
|||||||
{
|
{
|
||||||
PlannerInfo *subroot = rel->subroot;
|
PlannerInfo *subroot = rel->subroot;
|
||||||
RelOptInfo *sub_final_rel;
|
RelOptInfo *sub_final_rel;
|
||||||
RangeTblEntry *rte PG_USED_FOR_ASSERTS_ONLY;
|
|
||||||
ListCell *lc;
|
ListCell *lc;
|
||||||
|
|
||||||
/* Should only be applied to base relations that are subqueries */
|
/* Should only be applied to base relations that are subqueries */
|
||||||
Assert(rel->relid > 0);
|
Assert(rel->relid > 0);
|
||||||
#ifdef USE_ASSERT_CHECKING
|
Assert(planner_rt_fetch(rel->relid, root)->rtekind == RTE_SUBQUERY);
|
||||||
rte = planner_rt_fetch(rel->relid, root);
|
|
||||||
Assert(rte->rtekind == RTE_SUBQUERY);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copy raw number of output rows from subquery. All of its paths should
|
* 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)
|
|||||||
void
|
void
|
||||||
set_tablefunc_size_estimates(PlannerInfo *root, RelOptInfo *rel)
|
set_tablefunc_size_estimates(PlannerInfo *root, RelOptInfo *rel)
|
||||||
{
|
{
|
||||||
RangeTblEntry *rte PG_USED_FOR_ASSERTS_ONLY;
|
|
||||||
|
|
||||||
/* Should only be applied to base relations that are functions */
|
/* Should only be applied to base relations that are functions */
|
||||||
Assert(rel->relid > 0);
|
Assert(rel->relid > 0);
|
||||||
#ifdef USE_ASSERT_CHECKING
|
Assert(planner_rt_fetch(rel->relid, root)->rtekind == RTE_TABLEFUNC);
|
||||||
rte = planner_rt_fetch(rel->relid, root);
|
|
||||||
Assert(rte->rtekind == RTE_TABLEFUNC);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
rel->tuples = 100;
|
rel->tuples = 100;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user