mirror of
https://github.com/postgres/postgres.git
synced 2025-07-02 09:02:37 +03:00
Use l*_node() family of functions where appropriate
Instead of castNode(…, lfoo(…)) Author: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org> Discussion: https://www.postgresql.org/message-id/flat/87eecahraj.fsf@wibble.ilmari.org
This commit is contained in:
@ -7793,7 +7793,7 @@ find_param_referent(Param *param, deparse_context *context,
|
||||
*/
|
||||
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,
|
||||
subplan->plan_id - 1))
|
||||
@ -9407,7 +9407,7 @@ get_rule_expr(Node *node, deparse_context *context,
|
||||
sep = "";
|
||||
foreach(cell, spec->listdatums)
|
||||
{
|
||||
Const *val = castNode(Const, lfirst(cell));
|
||||
Const *val = lfirst_node(Const, cell);
|
||||
|
||||
appendStringInfoString(buf, sep);
|
||||
get_const_expr(val, context, -1);
|
||||
@ -11990,7 +11990,7 @@ get_range_partbound_string(List *bound_datums)
|
||||
foreach(cell, bound_datums)
|
||||
{
|
||||
PartitionRangeDatum *datum =
|
||||
castNode(PartitionRangeDatum, lfirst(cell));
|
||||
lfirst_node(PartitionRangeDatum, cell);
|
||||
|
||||
appendStringInfoString(buf, sep);
|
||||
if (datum->kind == PARTITION_RANGE_DATUM_MINVALUE)
|
||||
|
Reference in New Issue
Block a user