Re: Replace remaining castNode(…, lfirst(…)) and friends calls with l*_node()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: Dagfinn Ilmari Mannsåker <ilmari(at)ilmari(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Replace remaining castNode(…, lfirst(…)) and friends calls with l*_node()
Date: 2021-07-08 18:26:46
Message-ID: 2035769.1625768806@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Boris Kolpackov 2021-07-08 18:31:32 Re: Pipeline mode and PQpipelineSync()
Previous Message Alvaro Herrera 2021-07-08 18:17:41 Re: Replace remaining castNode(…, lfirst(…)) and friends calls with l*_node()