Re: [HACKERS] [COMMITTERS] pgsql: Generate fmgr prototypes automatically

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: [HACKERS] [COMMITTERS] pgsql: Generate fmgr prototypes automatically
Дата
Msg-id 20170117203000.2kxllmwznejbp3a6@alvherre.pgsql
обсуждение исходный текст
Ответы Re: [HACKERS] [COMMITTERS] pgsql: Generate fmgr prototypesautomatically  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
Tom Lane wrote:

> Alternatively ... is there a specific reason why you chose to make
> builtins.h the key inclusion file for this change, rather than having
> callers include fmgrprotos.h directly?  It seems like the stuff remaining
> in builtins.h is just a laundry list of random utility functions.
> Maybe dispersing those to other headers is the thing to do.

It is possible to replace many occurrences of builtins.h with
fmgrprotos.h.  I just tried this  git grep -l 'include.*utils/builtins.h' -- *.c | xargs perl -pi -e
's{utils/builtins.h}{utils/fmgrprotos.h}'
There's a large number of changes that the oneliner produces that must
be reverted for the compile to be silent, but a large portion can
remain.  (I only tried src/backend/access).

Anyway I support the idea of creating other header files for specific
purposes, such as ruleutils.h, varlena.h, etc.  (I am against creating a
header file that contains commonly used macros such as
CStringGetTextDatum together with varstr_sortsupport.  I think the
latter should have its own place).

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] generating fmgr prototypes automatically
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: [HACKERS] Gather Merge