Uses lfirst_node in ruleutils_14.c

Relevant PG commit:
2b00db4fb0c7f02f000276bfadaab65a14059168
pull/5209/head
Halil Ozan Akgul 2021-08-16 18:05:03 +03:00 committed by Sait Talha Nisanci
parent 3b7bcf7555
commit 86d9260781
1 changed files with 3 additions and 3 deletions

View File

@ -4521,7 +4521,7 @@ find_param_referent(Param *param, deparse_context *context,
*/ */
foreach(lc2, ((Plan *) ancestor)->initPlan) foreach(lc2, ((Plan *) ancestor)->initPlan)
{ {
SubPlan *subplan = castNode(SubPlan, lfirst(lc2)); SubPlan *subplan = lfirst_node(SubPlan, lc2);
if (child_plan != (Plan *) list_nth(dpns->subplans, if (child_plan != (Plan *) list_nth(dpns->subplans,
subplan->plan_id - 1)) subplan->plan_id - 1))
@ -6168,7 +6168,7 @@ get_rule_expr(Node *node, deparse_context *context,
sep = ""; sep = "";
foreach(cell, spec->listdatums) foreach(cell, spec->listdatums)
{ {
Const *val = castNode(Const, lfirst(cell)); Const *val = lfirst_node(Const, cell);
appendStringInfoString(buf, sep); appendStringInfoString(buf, sep);
get_const_expr(val, context, -1); get_const_expr(val, context, -1);
@ -8933,7 +8933,7 @@ get_range_partbound_string(List *bound_datums)
foreach(cell, bound_datums) foreach(cell, bound_datums)
{ {
PartitionRangeDatum *datum = PartitionRangeDatum *datum =
castNode(PartitionRangeDatum, lfirst(cell)); lfirst_node(PartitionRangeDatum, cell);
appendStringInfoString(buf, sep); appendStringInfoString(buf, sep);
if (datum->kind == PARTITION_RANGE_DATUM_MINVALUE) if (datum->kind == PARTITION_RANGE_DATUM_MINVALUE)