Re: Remove redundant initializations

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Remove redundant initializations
Date: 2021-06-30 12:42:53
Message-ID: CAApHDvotvHn4Q8wELdKeLX9K7WQKWhQYhsxDvSfw9D3pdtFqgQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 29 Jun 2021 at 02:15, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> The primary case where I personally rely on that style is when adding a
> new field to a struct. Currently it's possible to grep for some existing
> field and add the new one beside it. Leaving out initializations by
> relying on side-effects of makeNode makes that far riskier.

FWIW, I mostly grep for makeNode(NameOfNode) as I'm a bit mistrusting
of if the random existing field name that I pick to grep for will
properly showing me all the locations I should touch.

David

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey Lepikhov 2021-06-30 12:55:38 Re: Merging statistics from children instead of re-sampling everything
Previous Message Alvaro Herrera 2021-06-30 12:30:22 Re: cleaning up PostgresNode.pm