Re: Department of Redundancy Department: makeNode(FuncCall) division - Mailing list pgsql-hackers

From David Fetter
Subject Re: Department of Redundancy Department: makeNode(FuncCall) division
Date
Msg-id 20130628143808.GB2500@fetter.org
Whole thread Raw
In response to Re: Department of Redundancy Department: makeNode(FuncCall) division  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Jun 28, 2013 at 10:31:16AM -0400, Tom Lane wrote:
> David Fetter <david@fetter.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.

With utmost respect, this is just not true.

There's exactly one place that needs updating after adding another
field to FuncCall in the general case where the default value of the
field doesn't affect most setters of FuncCall, i.e. where the default
default is the right thing for current setters.  In specific cases
where such a field might need to be set to something other than its
default value, finding calls to makeFuncCall is just as easy, and with
some tools like cscope, even easier.

Cheers,
David.
-- 
David Fetter <david@fetter.org> http://fetter.org/
Phone: +1 415 235 3778  AIM: dfetter666  Yahoo!: dfetter
Skype: davidfetter      XMPP: david.fetter@gmail.com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Department of Redundancy Department: makeNode(FuncCall) division
Next
From: Tom Lane
Date:
Subject: Re: changeset generation v5-01 - Patches & git tree