[HACKERS] generating fmgr prototypes automatically

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема [HACKERS] generating fmgr prototypes automatically
Дата
Msg-id 98089934-6024-6d54-5ed9-c875f064835c@2ndquadrant.com
обсуждение исходный текст
Ответы Re: [HACKERS] generating fmgr prototypes automatically  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
During some recent patch reviews, there was some back and forth about
where to put prototypes for fmgr-callable functions.  We don't actually
need these prototypes except to satisfy the compiler, so we end up
sprinkling them around random header files.

I figured we could generate these prototypes automatically using the
existing Gen_fmgrtab.pl script.  That ends up saving more than 2000
lines of manual code, and it helps detect when a function exists in code
but is not registered in pg_proc.h.

... which this actually found in cash.c.  I ended up adding the missing
entries in pg_proc and pg_operator, but we could also opt to just remove
the unused code.

There are long-standing symbol clashes from the lo_* functions between
the backend and libpq.  So far this hasn't bothered anyone, but because
this patch rearranges some header files, the libpqwalreceiver code gets
upset.  So I renamed the C symbols for the backends functions in a
separate patch.  The user-visible function names remain the same.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Вложения

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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: [HACKERS] Group clear xid can leak semaphore count
Следующее
От: Peter Eisentraut
Дата:
Сообщение: [HACKERS] port of INSTALL file generation to XSLT