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

Поиск
Список
Период
Сортировка
От Noah Misch
Тема Re: Department of Redundancy Department: makeNode(FuncCall) division
Дата
Msg-id 20130628150415.GA925704@tornado.leadboat.com
обсуждение исходный текст
Ответ на Re: Department of Redundancy Department: makeNode(FuncCall) division  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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.

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: extensible external toast tuple support
Следующее
От: Andres Freund
Дата:
Сообщение: Re: changeset generation v5-01 - Patches & git tree