Re: Replace remaining castNode(…, lfirst(…)) and friends calls with l*_node() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Replace remaining castNode(…, lfirst(…)) and friends calls with l*_node()
Date
Msg-id 2035769.1625768806@sss.pgh.pa.us
Whole thread Raw
In response to Re: Replace remaining castNode(…, lfirst(…)) and friends calls with l*_node()  (Alvaro Herrera <alvherre@alvh.no-ip.org>)
List pgsql-hackers
Alvaro Herrera <alvherre@alvh.no-ip.org> writes:
> On 2021-Jul-07, Dagfinn Ilmari Mannsåker wrote:
>> PartitionRangeDatum *datum =
>> -        castNode(PartitionRangeDatum, lfirst(cell));
>> +        lfirst_node(PartitionRangeDatum, cell);

> This is pretty personal and subjective, but stylistically I dislike
> initializations that indent to the same level as the variable
> declarations they follow; they still require a second line of code and
> don't look good when in between other declarations.

Yeah, this seems like a pgindent bug to me, but I've not mustered the
energy to try to fix it.  As you say, it can be worked around by not
trying to lay out the code that way.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Replace remaining castNode(…, lfirst(…)) and friends calls with l*_node()
Next
From: Boris Kolpackov
Date:
Subject: Re: Pipeline mode and PQpipelineSync()