Re: Department of Redundancy Department: makeNode(FuncCall) division

From: Noah Misch <noah(at)leadboat(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: David Fetter <david(at)fetter(dot)org>, Jeevan Chalke <jeevan(dot)chalke(at)enterprisedb(dot)com>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Department of Redundancy Department: makeNode(FuncCall) division
Date: 2013-06-28 15:04:15
Message-ID: 20130628150415.GA925704@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Jun 28, 2013 at 10:31:16AM -0400, Tom Lane wrote:
> David Fetter <david(at)fetter(dot)org> writes:
> > Please find attached the latest patch.
>
> I remain of the opinion that this is simply a bad idea. It is unlike
> our habits for constructing other types of nodes, and makes it harder
> not easier to find all the places that need to be updated when adding
> another field to FuncCall.

We have precedents in makeRangeVar() and makeDefElem().

For me, this change would make it slightly easier to visit affected code sites
after a change. I could cscope for callers of makeFuncCall() instead of doing
"git grep 'makeNode(FuncCall)'". The advantage could go either way depending
on your tooling, though.

By having each call site only mention the seldom-used fields for which it does
something special, the distinctive aspects of the call site stand out better.
That's a nice advantage.

--
Noah Misch
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2013-06-28 15:08:41 Re: changeset generation v5-01 - Patches & git tree
Previous Message Andres Freund 2013-06-28 14:53:29 Re: extensible external toast tuple support