pgsql: Generate fmgr prototypes automatically

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Generate fmgr prototypes automatically
Date: 2017-01-17 19:06:32
Message-ID: E1cTZ5U-00037Y-95@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Generate fmgr prototypes automatically

Gen_fmgrtab.pl creates a new file fmgrprotos.h, which contains
prototypes for all functions registered in pg_proc.h. This avoids
having to manually maintain these prototypes across a random variety of
header files. It also automatically enforces a correct function
signature, and since there are warnings about missing prototypes, it
will detect functions that are defined but not registered in
pg_proc.h (or otherwise used).

Reviewed-by: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/352a24a1f9d6f7d4abb1175bfd22acc358f43140

Modified Files
--------------
contrib/btree_gist/btree_bit.c | 1 +
contrib/btree_gist/btree_bytea.c | 1 +
contrib/btree_gist/btree_date.c | 1 +
contrib/btree_gist/btree_interval.c | 1 +
contrib/btree_gist/btree_time.c | 1 +
contrib/intarray/_int_selfuncs.c | 1 +
contrib/lo/lo.c | 2 +-
contrib/spi/moddatetime.c | 2 +-
src/backend/Makefile | 15 +-
src/backend/access/brin/brin.c | 1 +
src/backend/access/brin/brin_inclusion.c | 5 +-
src/backend/access/brin/brin_minmax.c | 5 +-
src/backend/access/gin/ginfast.c | 1 +
src/backend/access/gist/gist.c | 1 +
src/backend/access/hash/hash.c | 1 +
src/backend/access/hash/hashfunc.c | 10 +
src/backend/access/index/amapi.c | 1 +
src/backend/access/nbtree/nbtree.c | 1 +
src/backend/access/spgist/spgutils.c | 1 +
src/backend/access/transam/xlogfuncs.c | 1 -
src/backend/catalog/namespace.c | 16 -
src/backend/catalog/pg_proc.c | 4 -
src/backend/commands/define.c | 2 +-
src/backend/executor/nodeSamplescan.c | 1 +
src/backend/foreign/foreign.c | 4 -
src/backend/storage/smgr/smgrtype.c | 1 +
src/backend/tsearch/dict_ispell.c | 1 +
src/backend/tsearch/dict_simple.c | 1 +
src/backend/tsearch/dict_synonym.c | 1 +
src/backend/tsearch/ts_selfuncs.c | 1 +
src/backend/utils/.gitignore | 1 +
src/backend/utils/Gen_fmgrtab.pl | 35 +-
src/backend/utils/Makefile | 12 +-
src/backend/utils/adt/array_selfuncs.c | 1 +
src/backend/utils/adt/array_typanalyze.c | 1 +
src/backend/utils/adt/ascii.c | 1 +
src/backend/utils/adt/geo_selfuncs.c | 1 +
src/backend/utils/adt/jsonb_op.c | 1 +
src/backend/utils/adt/network_gist.c | 1 +
src/backend/utils/adt/network_selfuncs.c | 1 +
src/backend/utils/adt/network_spgist.c | 1 +
src/backend/utils/adt/numeric.c | 6 +-
src/backend/utils/adt/pg_upgrade_support.c | 12 -
src/backend/utils/adt/pgstatfuncs.c | 100 ---
src/backend/utils/adt/rangetypes_spgist.c | 7 -
src/backend/utils/adt/tsgistidx.c | 1 +
src/backend/utils/adt/tsquery_gist.c | 1 +
src/backend/utils/adt/tsquery_op.c | 1 +
src/backend/utils/adt/tsrank.c | 1 +
src/backend/utils/adt/tsvector.c | 1 +
src/backend/utils/adt/varbit.c | 1 +
src/include/Makefile | 3 +-
src/include/access/amapi.h | 2 -
src/include/access/brin.h | 6 -
src/include/access/gin_private.h | 4 -
src/include/access/gist_private.h | 1 -
src/include/access/hash.h | 22 -
src/include/access/nbtree.h | 1 -
src/include/access/spgist.h | 1 -
src/include/access/xlog_fn.h | 37 -
src/include/catalog/pg_proc.h | 1 +
src/include/commands/async.h | 5 -
src/include/commands/sequence.h | 8 -
src/include/commands/trigger.h | 2 -
src/include/libpq/be-fsstubs.h | 31 -
src/include/replication/logicalfuncs.h | 7 -
src/include/replication/origin.h | 14 -
src/include/replication/slot.h | 6 -
src/include/replication/walreceiver.h | 1 -
src/include/replication/walsender.h | 2 -
src/include/storage/smgr.h | 6 -
src/include/tsearch/ts_type.h | 89 ---
src/include/tsearch/ts_utils.h | 117 ---
src/include/utils/.gitignore | 1 +
src/include/utils/acl.h | 14 -
src/include/utils/array.h | 50 --
src/include/utils/ascii.h | 6 -
src/include/utils/builtins.h | 1186 +---------------------------
src/include/utils/bytea.h | 25 -
src/include/utils/cash.h | 48 --
src/include/utils/date.h | 113 ---
src/include/utils/datetime.h | 3 -
src/include/utils/formatting.h | 12 -
src/include/utils/geo_decls.h | 262 +-----
src/include/utils/inet.h | 27 -
src/include/utils/int8.h | 104 ---
src/include/utils/json.h | 64 --
src/include/utils/jsonb.h | 67 --
src/include/utils/nabstime.h | 63 --
src/include/utils/pg_lsn.h | 16 -
src/include/utils/rangetypes.h | 80 --
src/include/utils/selfuncs.h | 28 -
src/include/utils/snapmgr.h | 1 -
src/include/utils/timestamp.h | 125 ---
src/include/utils/varbit.h | 46 --
src/include/utils/xml.h | 33 -
src/tools/msvc/Solution.pm | 10 +-
src/tools/msvc/clean.bat | 2 +
98 files changed, 125 insertions(+), 2899 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2017-01-17 19:17:36 pgsql: Correct include file path
Previous Message Peter Eisentraut 2017-01-17 17:48:54 pgsql: Remove unnecessary prototypes in loadable modules

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-01-17 19:15:21 Re: Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)
Previous Message Antonin Houska 2017-01-17 19:05:25 Re: PoC: Grouped base relation