mirror of
https://github.com/postgres/postgres.git
synced 2025-05-31 00:01:57 -04:00
Remove unnecessary casts of makeNode() result
makeNode() is already a macro that has the right result pointer type, so casting it again to the same type is unnecessary.
This commit is contained in:
parent
3c9d398484
commit
158df30359
@ -12743,7 +12743,7 @@ transformPartitionSpec(Relation rel, PartitionSpec *partspec, char *strategy)
|
||||
RangeTblEntry *rte;
|
||||
ListCell *l;
|
||||
|
||||
newspec = (PartitionSpec *) makeNode(PartitionSpec);
|
||||
newspec = makeNode(PartitionSpec);
|
||||
|
||||
newspec->strategy = partspec->strategy;
|
||||
newspec->location = partspec->location;
|
||||
|
@ -4594,16 +4594,16 @@ ExecInitExpr(Expr *node, PlanState *parent)
|
||||
}
|
||||
else
|
||||
{
|
||||
state = (ExprState *) makeNode(ExprState);
|
||||
state = makeNode(ExprState);
|
||||
state->evalfunc = ExecEvalScalarVar;
|
||||
}
|
||||
break;
|
||||
case T_Const:
|
||||
state = (ExprState *) makeNode(ExprState);
|
||||
state = makeNode(ExprState);
|
||||
state->evalfunc = ExecEvalConst;
|
||||
break;
|
||||
case T_Param:
|
||||
state = (ExprState *) makeNode(ExprState);
|
||||
state = makeNode(ExprState);
|
||||
switch (((Param *) node)->paramkind)
|
||||
{
|
||||
case PARAM_EXEC:
|
||||
@ -4619,11 +4619,11 @@ ExecInitExpr(Expr *node, PlanState *parent)
|
||||
}
|
||||
break;
|
||||
case T_CoerceToDomainValue:
|
||||
state = (ExprState *) makeNode(ExprState);
|
||||
state = makeNode(ExprState);
|
||||
state->evalfunc = ExecEvalCoerceToDomainValue;
|
||||
break;
|
||||
case T_CaseTestExpr:
|
||||
state = (ExprState *) makeNode(ExprState);
|
||||
state = makeNode(ExprState);
|
||||
state->evalfunc = ExecEvalCaseTestExpr;
|
||||
break;
|
||||
case T_Aggref:
|
||||
@ -5176,7 +5176,7 @@ ExecInitExpr(Expr *node, PlanState *parent)
|
||||
}
|
||||
break;
|
||||
case T_SQLValueFunction:
|
||||
state = (ExprState *) makeNode(ExprState);
|
||||
state = makeNode(ExprState);
|
||||
state->evalfunc = ExecEvalSQLValueFunction;
|
||||
break;
|
||||
case T_XmlExpr:
|
||||
@ -5250,7 +5250,7 @@ ExecInitExpr(Expr *node, PlanState *parent)
|
||||
}
|
||||
break;
|
||||
case T_CurrentOfExpr:
|
||||
state = (ExprState *) makeNode(ExprState);
|
||||
state = makeNode(ExprState);
|
||||
state->evalfunc = ExecEvalCurrentOfExpr;
|
||||
break;
|
||||
case T_TargetEntry:
|
||||
|
@ -131,8 +131,7 @@ identify_system:
|
||||
base_backup:
|
||||
K_BASE_BACKUP base_backup_opt_list
|
||||
{
|
||||
BaseBackupCmd *cmd =
|
||||
(BaseBackupCmd *) makeNode(BaseBackupCmd);
|
||||
BaseBackupCmd *cmd = makeNode(BaseBackupCmd);
|
||||
cmd->options = $2;
|
||||
$$ = (Node *) cmd;
|
||||
}
|
||||
|
@ -703,7 +703,7 @@ add_with_check_options(Relation rel,
|
||||
*/
|
||||
WithCheckOption *wco;
|
||||
|
||||
wco = (WithCheckOption *) makeNode(WithCheckOption);
|
||||
wco = makeNode(WithCheckOption);
|
||||
wco->kind = kind;
|
||||
wco->relname = pstrdup(RelationGetRelationName(rel));
|
||||
wco->polname = NULL;
|
||||
@ -735,7 +735,7 @@ add_with_check_options(Relation rel,
|
||||
qual = copyObject(qual);
|
||||
ChangeVarNodes((Node *) qual, 1, rt_index, 0);
|
||||
|
||||
wco = (WithCheckOption *) makeNode(WithCheckOption);
|
||||
wco = makeNode(WithCheckOption);
|
||||
wco->kind = kind;
|
||||
wco->relname = pstrdup(RelationGetRelationName(rel));
|
||||
wco->polname = pstrdup(policy->policy_name);
|
||||
@ -755,7 +755,7 @@ add_with_check_options(Relation rel,
|
||||
*/
|
||||
WithCheckOption *wco;
|
||||
|
||||
wco = (WithCheckOption *) makeNode(WithCheckOption);
|
||||
wco = makeNode(WithCheckOption);
|
||||
wco->kind = kind;
|
||||
wco->relname = pstrdup(RelationGetRelationName(rel));
|
||||
wco->polname = NULL;
|
||||
|
Loading…
x
Reference in New Issue
Block a user