diff --git a/contrib/adminpack/adminpack.c b/contrib/adminpack/adminpack.c
index 27cbcde073a88e8a7dca432b6d712b2232353318..8193b1f1d0cd68ab885c18de7acf117c1699c02b 100644
--- a/contrib/adminpack/adminpack.c
+++ b/contrib/adminpack/adminpack.c
@@ -40,11 +40,6 @@
 
 PG_MODULE_MAGIC;
 
-Datum		pg_file_write(PG_FUNCTION_ARGS);
-Datum		pg_file_rename(PG_FUNCTION_ARGS);
-Datum		pg_file_unlink(PG_FUNCTION_ARGS);
-Datum		pg_logdir_ls(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(pg_file_write);
 PG_FUNCTION_INFO_V1(pg_file_rename);
 PG_FUNCTION_INFO_V1(pg_file_unlink);
diff --git a/contrib/btree_gin/btree_gin.c b/contrib/btree_gin/btree_gin.c
index 5e6003f63cbe2f5a1befdc4971bb73fc5d72be26..87d23e0350556a9186703af63c9833ea83db9726 100644
--- a/contrib/btree_gin/btree_gin.c
+++ b/contrib/btree_gin/btree_gin.c
@@ -32,7 +32,6 @@ typedef struct QueryInfo
 
 #define  GIN_EXTRACT_VALUE(type)											\
 PG_FUNCTION_INFO_V1(gin_extract_value_##type);								\
-Datum		gin_extract_value_##type(PG_FUNCTION_ARGS);						\
 Datum																		\
 gin_extract_value_##type(PG_FUNCTION_ARGS)									\
 {																			\
@@ -59,7 +58,6 @@ gin_extract_value_##type(PG_FUNCTION_ARGS)									\
 
 #define GIN_EXTRACT_QUERY(type)												\
 PG_FUNCTION_INFO_V1(gin_extract_query_##type);								\
-Datum		gin_extract_query_##type(PG_FUNCTION_ARGS);						\
 Datum																		\
 gin_extract_query_##type(PG_FUNCTION_ARGS)									\
 {																			\
@@ -109,7 +107,6 @@ gin_extract_query_##type(PG_FUNCTION_ARGS)									\
  */
 #define GIN_COMPARE_PREFIX(type)											\
 PG_FUNCTION_INFO_V1(gin_compare_prefix_##type);								\
-Datum		gin_compare_prefix_##type(PG_FUNCTION_ARGS);					\
 Datum																		\
 gin_compare_prefix_##type(PG_FUNCTION_ARGS)									\
 {																			\
@@ -182,7 +179,6 @@ gin_compare_prefix_##type(PG_FUNCTION_ARGS)									\
 
 
 PG_FUNCTION_INFO_V1(gin_btree_consistent);
-Datum		gin_btree_consistent(PG_FUNCTION_ARGS);
 Datum
 gin_btree_consistent(PG_FUNCTION_ARGS)
 {
@@ -404,7 +400,6 @@ GIN_SUPPORT(varbit)
 #define NUMERIC_IS_LEFTMOST(x)	((x) == NULL)
 
 PG_FUNCTION_INFO_V1(gin_numeric_cmp);
-Datum		gin_numeric_cmp(PG_FUNCTION_ARGS);
 
 Datum
 gin_numeric_cmp(PG_FUNCTION_ARGS)
diff --git a/contrib/btree_gist/btree_bit.c b/contrib/btree_gist/btree_bit.c
index d94abcb3cf51d74b3a628f5c5af270b1ef9066aa..edf75e068421cda7572bcacf5fc66a3e813e3889 100644
--- a/contrib/btree_gist/btree_bit.c
+++ b/contrib/btree_gist/btree_bit.c
@@ -19,14 +19,6 @@ PG_FUNCTION_INFO_V1(gbt_bit_consistent);
 PG_FUNCTION_INFO_V1(gbt_bit_penalty);
 PG_FUNCTION_INFO_V1(gbt_bit_same);
 
-Datum		gbt_bit_compress(PG_FUNCTION_ARGS);
-Datum		gbt_bit_union(PG_FUNCTION_ARGS);
-Datum		gbt_bit_picksplit(PG_FUNCTION_ARGS);
-Datum		gbt_bit_consistent(PG_FUNCTION_ARGS);
-Datum		gbt_bit_penalty(PG_FUNCTION_ARGS);
-Datum		gbt_bit_same(PG_FUNCTION_ARGS);
-
-
 
 /* define for comparison */
 
diff --git a/contrib/btree_gist/btree_bytea.c b/contrib/btree_gist/btree_bytea.c
index 0dd441964a637834f9edce824653ec1bfd070c90..dfc25a45c6f60ff051069da3ac8ed23e42fbd0be 100644
--- a/contrib/btree_gist/btree_bytea.c
+++ b/contrib/btree_gist/btree_bytea.c
@@ -18,13 +18,6 @@ PG_FUNCTION_INFO_V1(gbt_bytea_consistent);
 PG_FUNCTION_INFO_V1(gbt_bytea_penalty);
 PG_FUNCTION_INFO_V1(gbt_bytea_same);
 
-Datum		gbt_bytea_compress(PG_FUNCTION_ARGS);
-Datum		gbt_bytea_union(PG_FUNCTION_ARGS);
-Datum		gbt_bytea_picksplit(PG_FUNCTION_ARGS);
-Datum		gbt_bytea_consistent(PG_FUNCTION_ARGS);
-Datum		gbt_bytea_penalty(PG_FUNCTION_ARGS);
-Datum		gbt_bytea_same(PG_FUNCTION_ARGS);
-
 
 /* define for comparison */
 
diff --git a/contrib/btree_gist/btree_cash.c b/contrib/btree_gist/btree_cash.c
index 8e8495ca0686fde77a830e6dfbe9c4d83cfc7982..8de3716c945ec34aa9837494352193548ce1900e 100644
--- a/contrib/btree_gist/btree_cash.c
+++ b/contrib/btree_gist/btree_cash.c
@@ -24,14 +24,6 @@ PG_FUNCTION_INFO_V1(gbt_cash_distance);
 PG_FUNCTION_INFO_V1(gbt_cash_penalty);
 PG_FUNCTION_INFO_V1(gbt_cash_same);
 
-Datum		gbt_cash_compress(PG_FUNCTION_ARGS);
-Datum		gbt_cash_union(PG_FUNCTION_ARGS);
-Datum		gbt_cash_picksplit(PG_FUNCTION_ARGS);
-Datum		gbt_cash_consistent(PG_FUNCTION_ARGS);
-Datum		gbt_cash_distance(PG_FUNCTION_ARGS);
-Datum		gbt_cash_penalty(PG_FUNCTION_ARGS);
-Datum		gbt_cash_same(PG_FUNCTION_ARGS);
-
 static bool
 gbt_cashgt(const void *a, const void *b)
 {
@@ -97,7 +89,6 @@ static const gbtree_ninfo tinfo =
 
 
 PG_FUNCTION_INFO_V1(cash_dist);
-Datum		cash_dist(PG_FUNCTION_ARGS);
 Datum
 cash_dist(PG_FUNCTION_ARGS)
 {
diff --git a/contrib/btree_gist/btree_date.c b/contrib/btree_gist/btree_date.c
index 1c0c3ec20c8a7f9d5a4acd8c1067936cc2ff47ef..9cab7ec42f5d17cd9a51d5195a1f088c5c5c1cd9 100644
--- a/contrib/btree_gist/btree_date.c
+++ b/contrib/btree_gist/btree_date.c
@@ -24,14 +24,6 @@ PG_FUNCTION_INFO_V1(gbt_date_distance);
 PG_FUNCTION_INFO_V1(gbt_date_penalty);
 PG_FUNCTION_INFO_V1(gbt_date_same);
 
-Datum		gbt_date_compress(PG_FUNCTION_ARGS);
-Datum		gbt_date_union(PG_FUNCTION_ARGS);
-Datum		gbt_date_picksplit(PG_FUNCTION_ARGS);
-Datum		gbt_date_consistent(PG_FUNCTION_ARGS);
-Datum		gbt_date_distance(PG_FUNCTION_ARGS);
-Datum		gbt_date_penalty(PG_FUNCTION_ARGS);
-Datum		gbt_date_same(PG_FUNCTION_ARGS);
-
 static bool
 gbt_dategt(const void *a, const void *b)
 {
@@ -115,7 +107,6 @@ static const gbtree_ninfo tinfo =
 
 
 PG_FUNCTION_INFO_V1(date_dist);
-Datum		date_dist(PG_FUNCTION_ARGS);
 Datum
 date_dist(PG_FUNCTION_ARGS)
 {
diff --git a/contrib/btree_gist/btree_float4.c b/contrib/btree_gist/btree_float4.c
index cf1e45a381bcf31ffbfc1faefc0389a00e795803..55e1c4c1c6d676cefee4d3ac7af2e370b4b3c589 100644
--- a/contrib/btree_gist/btree_float4.c
+++ b/contrib/btree_gist/btree_float4.c
@@ -23,14 +23,6 @@ PG_FUNCTION_INFO_V1(gbt_float4_distance);
 PG_FUNCTION_INFO_V1(gbt_float4_penalty);
 PG_FUNCTION_INFO_V1(gbt_float4_same);
 
-Datum		gbt_float4_compress(PG_FUNCTION_ARGS);
-Datum		gbt_float4_union(PG_FUNCTION_ARGS);
-Datum		gbt_float4_picksplit(PG_FUNCTION_ARGS);
-Datum		gbt_float4_consistent(PG_FUNCTION_ARGS);
-Datum		gbt_float4_distance(PG_FUNCTION_ARGS);
-Datum		gbt_float4_penalty(PG_FUNCTION_ARGS);
-Datum		gbt_float4_same(PG_FUNCTION_ARGS);
-
 static bool
 gbt_float4gt(const void *a, const void *b)
 {
@@ -96,7 +88,6 @@ static const gbtree_ninfo tinfo =
 
 
 PG_FUNCTION_INFO_V1(float4_dist);
-Datum		float4_dist(PG_FUNCTION_ARGS);
 Datum
 float4_dist(PG_FUNCTION_ARGS)
 {
diff --git a/contrib/btree_gist/btree_float8.c b/contrib/btree_gist/btree_float8.c
index 3ce87642cb9574dbb073209ce26b7d47374d6f8a..62271dec84aa94a9f8f9300743bdea2e7c556505 100644
--- a/contrib/btree_gist/btree_float8.c
+++ b/contrib/btree_gist/btree_float8.c
@@ -23,14 +23,6 @@ PG_FUNCTION_INFO_V1(gbt_float8_distance);
 PG_FUNCTION_INFO_V1(gbt_float8_penalty);
 PG_FUNCTION_INFO_V1(gbt_float8_same);
 
-Datum		gbt_float8_compress(PG_FUNCTION_ARGS);
-Datum		gbt_float8_union(PG_FUNCTION_ARGS);
-Datum		gbt_float8_picksplit(PG_FUNCTION_ARGS);
-Datum		gbt_float8_consistent(PG_FUNCTION_ARGS);
-Datum		gbt_float8_distance(PG_FUNCTION_ARGS);
-Datum		gbt_float8_penalty(PG_FUNCTION_ARGS);
-Datum		gbt_float8_same(PG_FUNCTION_ARGS);
-
 
 static bool
 gbt_float8gt(const void *a, const void *b)
@@ -104,7 +96,6 @@ static const gbtree_ninfo tinfo =
 
 
 PG_FUNCTION_INFO_V1(float8_dist);
-Datum		float8_dist(PG_FUNCTION_ARGS);
 Datum
 float8_dist(PG_FUNCTION_ARGS)
 {
diff --git a/contrib/btree_gist/btree_gist.c b/contrib/btree_gist/btree_gist.c
index f2d2ed2cb28b34d18551c8a2cee3c4f16fc1a8c7..e1dc253c96e164570c7fe79bb26500789f58ea1c 100644
--- a/contrib/btree_gist/btree_gist.c
+++ b/contrib/btree_gist/btree_gist.c
@@ -11,8 +11,6 @@ PG_FUNCTION_INFO_V1(gbt_decompress);
 PG_FUNCTION_INFO_V1(gbtreekey_in);
 PG_FUNCTION_INFO_V1(gbtreekey_out);
 
-Datum		gbt_decompress(PG_FUNCTION_ARGS);
-
 /**************************************************
  * In/Out for keys
  **************************************************/
diff --git a/contrib/btree_gist/btree_inet.c b/contrib/btree_gist/btree_inet.c
index c136296ab536e2262628fb182eab9d3debe960d0..24ae6bf36935d0b467d7ed0fe48f2fa5d44228e0 100644
--- a/contrib/btree_gist/btree_inet.c
+++ b/contrib/btree_gist/btree_inet.c
@@ -25,13 +25,6 @@ PG_FUNCTION_INFO_V1(gbt_inet_consistent);
 PG_FUNCTION_INFO_V1(gbt_inet_penalty);
 PG_FUNCTION_INFO_V1(gbt_inet_same);
 
-Datum		gbt_inet_compress(PG_FUNCTION_ARGS);
-Datum		gbt_inet_union(PG_FUNCTION_ARGS);
-Datum		gbt_inet_picksplit(PG_FUNCTION_ARGS);
-Datum		gbt_inet_consistent(PG_FUNCTION_ARGS);
-Datum		gbt_inet_penalty(PG_FUNCTION_ARGS);
-Datum		gbt_inet_same(PG_FUNCTION_ARGS);
-
 
 static bool
 gbt_inetgt(const void *a, const void *b)
diff --git a/contrib/btree_gist/btree_int2.c b/contrib/btree_gist/btree_int2.c
index 6a438bf1f22390d542912eef1a1faebbface5834..d51ad0c2ab2efb7f1e1b00705f8650365e06addc 100644
--- a/contrib/btree_gist/btree_int2.c
+++ b/contrib/btree_gist/btree_int2.c
@@ -23,14 +23,6 @@ PG_FUNCTION_INFO_V1(gbt_int2_distance);
 PG_FUNCTION_INFO_V1(gbt_int2_penalty);
 PG_FUNCTION_INFO_V1(gbt_int2_same);
 
-Datum		gbt_int2_compress(PG_FUNCTION_ARGS);
-Datum		gbt_int2_union(PG_FUNCTION_ARGS);
-Datum		gbt_int2_picksplit(PG_FUNCTION_ARGS);
-Datum		gbt_int2_consistent(PG_FUNCTION_ARGS);
-Datum		gbt_int2_distance(PG_FUNCTION_ARGS);
-Datum		gbt_int2_penalty(PG_FUNCTION_ARGS);
-Datum		gbt_int2_same(PG_FUNCTION_ARGS);
-
 static bool
 gbt_int2gt(const void *a, const void *b)
 {
@@ -96,7 +88,6 @@ static const gbtree_ninfo tinfo =
 
 
 PG_FUNCTION_INFO_V1(int2_dist);
-Datum		int2_dist(PG_FUNCTION_ARGS);
 Datum
 int2_dist(PG_FUNCTION_ARGS)
 {
diff --git a/contrib/btree_gist/btree_int4.c b/contrib/btree_gist/btree_int4.c
index df2164fc5eb6a45456aca953161bb292f5249a16..e7641f22847a975d7b4de7b9a75941d99887bd8d 100644
--- a/contrib/btree_gist/btree_int4.c
+++ b/contrib/btree_gist/btree_int4.c
@@ -23,14 +23,6 @@ PG_FUNCTION_INFO_V1(gbt_int4_distance);
 PG_FUNCTION_INFO_V1(gbt_int4_penalty);
 PG_FUNCTION_INFO_V1(gbt_int4_same);
 
-Datum		gbt_int4_compress(PG_FUNCTION_ARGS);
-Datum		gbt_int4_union(PG_FUNCTION_ARGS);
-Datum		gbt_int4_picksplit(PG_FUNCTION_ARGS);
-Datum		gbt_int4_consistent(PG_FUNCTION_ARGS);
-Datum		gbt_int4_distance(PG_FUNCTION_ARGS);
-Datum		gbt_int4_penalty(PG_FUNCTION_ARGS);
-Datum		gbt_int4_same(PG_FUNCTION_ARGS);
-
 
 static bool
 gbt_int4gt(const void *a, const void *b)
@@ -97,7 +89,6 @@ static const gbtree_ninfo tinfo =
 
 
 PG_FUNCTION_INFO_V1(int4_dist);
-Datum		int4_dist(PG_FUNCTION_ARGS);
 Datum
 int4_dist(PG_FUNCTION_ARGS)
 {
diff --git a/contrib/btree_gist/btree_int8.c b/contrib/btree_gist/btree_int8.c
index c05d8687fd3e8b79855327f844033b63c73cdd69..8bc8cb5fdf7de08ff5ec2e759eb39bfd36b8227c 100644
--- a/contrib/btree_gist/btree_int8.c
+++ b/contrib/btree_gist/btree_int8.c
@@ -23,14 +23,6 @@ PG_FUNCTION_INFO_V1(gbt_int8_distance);
 PG_FUNCTION_INFO_V1(gbt_int8_penalty);
 PG_FUNCTION_INFO_V1(gbt_int8_same);
 
-Datum		gbt_int8_compress(PG_FUNCTION_ARGS);
-Datum		gbt_int8_union(PG_FUNCTION_ARGS);
-Datum		gbt_int8_picksplit(PG_FUNCTION_ARGS);
-Datum		gbt_int8_consistent(PG_FUNCTION_ARGS);
-Datum		gbt_int8_distance(PG_FUNCTION_ARGS);
-Datum		gbt_int8_penalty(PG_FUNCTION_ARGS);
-Datum		gbt_int8_same(PG_FUNCTION_ARGS);
-
 
 static bool
 gbt_int8gt(const void *a, const void *b)
@@ -97,7 +89,6 @@ static const gbtree_ninfo tinfo =
 
 
 PG_FUNCTION_INFO_V1(int8_dist);
-Datum		int8_dist(PG_FUNCTION_ARGS);
 Datum
 int8_dist(PG_FUNCTION_ARGS)
 {
diff --git a/contrib/btree_gist/btree_interval.c b/contrib/btree_gist/btree_interval.c
index bb779adf8e55a56952a742e2cebcd5ae784c4def..e406d7120c4937a2582e84e916af4dc464b90777 100644
--- a/contrib/btree_gist/btree_interval.c
+++ b/contrib/btree_gist/btree_interval.c
@@ -26,15 +26,6 @@ PG_FUNCTION_INFO_V1(gbt_intv_distance);
 PG_FUNCTION_INFO_V1(gbt_intv_penalty);
 PG_FUNCTION_INFO_V1(gbt_intv_same);
 
-Datum		gbt_intv_compress(PG_FUNCTION_ARGS);
-Datum		gbt_intv_decompress(PG_FUNCTION_ARGS);
-Datum		gbt_intv_union(PG_FUNCTION_ARGS);
-Datum		gbt_intv_picksplit(PG_FUNCTION_ARGS);
-Datum		gbt_intv_consistent(PG_FUNCTION_ARGS);
-Datum		gbt_intv_distance(PG_FUNCTION_ARGS);
-Datum		gbt_intv_penalty(PG_FUNCTION_ARGS);
-Datum		gbt_intv_same(PG_FUNCTION_ARGS);
-
 
 static bool
 gbt_intvgt(const void *a, const void *b)
@@ -129,7 +120,6 @@ abs_interval(Interval *a)
 }
 
 PG_FUNCTION_INFO_V1(interval_dist);
-Datum		interval_dist(PG_FUNCTION_ARGS);
 Datum
 interval_dist(PG_FUNCTION_ARGS)
 {
diff --git a/contrib/btree_gist/btree_macaddr.c b/contrib/btree_gist/btree_macaddr.c
index 31125beda61479dce6f389445b16d7aa28fc9e38..6255564ac5abaaad828db3168dcec76c28a70144 100644
--- a/contrib/btree_gist/btree_macaddr.c
+++ b/contrib/btree_gist/btree_macaddr.c
@@ -24,13 +24,6 @@ PG_FUNCTION_INFO_V1(gbt_macad_consistent);
 PG_FUNCTION_INFO_V1(gbt_macad_penalty);
 PG_FUNCTION_INFO_V1(gbt_macad_same);
 
-Datum		gbt_macad_compress(PG_FUNCTION_ARGS);
-Datum		gbt_macad_union(PG_FUNCTION_ARGS);
-Datum		gbt_macad_picksplit(PG_FUNCTION_ARGS);
-Datum		gbt_macad_consistent(PG_FUNCTION_ARGS);
-Datum		gbt_macad_penalty(PG_FUNCTION_ARGS);
-Datum		gbt_macad_same(PG_FUNCTION_ARGS);
-
 
 static bool
 gbt_macadgt(const void *a, const void *b)
diff --git a/contrib/btree_gist/btree_numeric.c b/contrib/btree_gist/btree_numeric.c
index 37938aff6aa068e7cf27b78d827dc0f3e385b818..02ccca86471ac0be76bf835562231262bea4b956 100644
--- a/contrib/btree_gist/btree_numeric.c
+++ b/contrib/btree_gist/btree_numeric.c
@@ -23,13 +23,6 @@ PG_FUNCTION_INFO_V1(gbt_numeric_consistent);
 PG_FUNCTION_INFO_V1(gbt_numeric_penalty);
 PG_FUNCTION_INFO_V1(gbt_numeric_same);
 
-Datum		gbt_numeric_compress(PG_FUNCTION_ARGS);
-Datum		gbt_numeric_union(PG_FUNCTION_ARGS);
-Datum		gbt_numeric_picksplit(PG_FUNCTION_ARGS);
-Datum		gbt_numeric_consistent(PG_FUNCTION_ARGS);
-Datum		gbt_numeric_penalty(PG_FUNCTION_ARGS);
-Datum		gbt_numeric_same(PG_FUNCTION_ARGS);
-
 
 /* define for comparison */
 
diff --git a/contrib/btree_gist/btree_oid.c b/contrib/btree_gist/btree_oid.c
index e80a23c0b1a3996d134924e4f0dd098f5b3bada8..dcd0765417bf6833a974fcb03af1f7d96e64e50a 100644
--- a/contrib/btree_gist/btree_oid.c
+++ b/contrib/btree_gist/btree_oid.c
@@ -23,14 +23,6 @@ PG_FUNCTION_INFO_V1(gbt_oid_distance);
 PG_FUNCTION_INFO_V1(gbt_oid_penalty);
 PG_FUNCTION_INFO_V1(gbt_oid_same);
 
-Datum		gbt_oid_compress(PG_FUNCTION_ARGS);
-Datum		gbt_oid_union(PG_FUNCTION_ARGS);
-Datum		gbt_oid_picksplit(PG_FUNCTION_ARGS);
-Datum		gbt_oid_consistent(PG_FUNCTION_ARGS);
-Datum		gbt_oid_distance(PG_FUNCTION_ARGS);
-Datum		gbt_oid_penalty(PG_FUNCTION_ARGS);
-Datum		gbt_oid_same(PG_FUNCTION_ARGS);
-
 
 static bool
 gbt_oidgt(const void *a, const void *b)
@@ -103,7 +95,6 @@ static const gbtree_ninfo tinfo =
 
 
 PG_FUNCTION_INFO_V1(oid_dist);
-Datum		oid_dist(PG_FUNCTION_ARGS);
 Datum
 oid_dist(PG_FUNCTION_ARGS)
 {
diff --git a/contrib/btree_gist/btree_text.c b/contrib/btree_gist/btree_text.c
index 56790a998317b7171be7838b0251de0805530853..2e00cb60bad28b9090ef1f30ecc92c6988d5fa18 100644
--- a/contrib/btree_gist/btree_text.c
+++ b/contrib/btree_gist/btree_text.c
@@ -19,15 +19,6 @@ PG_FUNCTION_INFO_V1(gbt_bpchar_consistent);
 PG_FUNCTION_INFO_V1(gbt_text_penalty);
 PG_FUNCTION_INFO_V1(gbt_text_same);
 
-Datum		gbt_text_compress(PG_FUNCTION_ARGS);
-Datum		gbt_bpchar_compress(PG_FUNCTION_ARGS);
-Datum		gbt_text_union(PG_FUNCTION_ARGS);
-Datum		gbt_text_picksplit(PG_FUNCTION_ARGS);
-Datum		gbt_text_consistent(PG_FUNCTION_ARGS);
-Datum		gbt_bpchar_consistent(PG_FUNCTION_ARGS);
-Datum		gbt_text_penalty(PG_FUNCTION_ARGS);
-Datum		gbt_text_same(PG_FUNCTION_ARGS);
-
 
 /* define for comparison */
 
diff --git a/contrib/btree_gist/btree_time.c b/contrib/btree_gist/btree_time.c
index a148e5e120bfb8402e99c13ec9bf199a61eaac36..e0e32428e22f1b96faac017a9ab9952c82f8afcc 100644
--- a/contrib/btree_gist/btree_time.c
+++ b/contrib/btree_gist/btree_time.c
@@ -27,16 +27,6 @@ PG_FUNCTION_INFO_V1(gbt_timetz_consistent);
 PG_FUNCTION_INFO_V1(gbt_time_penalty);
 PG_FUNCTION_INFO_V1(gbt_time_same);
 
-Datum		gbt_time_compress(PG_FUNCTION_ARGS);
-Datum		gbt_timetz_compress(PG_FUNCTION_ARGS);
-Datum		gbt_time_union(PG_FUNCTION_ARGS);
-Datum		gbt_time_picksplit(PG_FUNCTION_ARGS);
-Datum		gbt_time_consistent(PG_FUNCTION_ARGS);
-Datum		gbt_time_distance(PG_FUNCTION_ARGS);
-Datum		gbt_timetz_consistent(PG_FUNCTION_ARGS);
-Datum		gbt_time_penalty(PG_FUNCTION_ARGS);
-Datum		gbt_time_same(PG_FUNCTION_ARGS);
-
 
 #ifdef USE_FLOAT8_BYVAL
 #define TimeADTGetDatumFast(X) TimeADTGetDatum(X)
@@ -145,7 +135,6 @@ static const gbtree_ninfo tinfo =
 
 
 PG_FUNCTION_INFO_V1(time_dist);
-Datum		time_dist(PG_FUNCTION_ARGS);
 Datum
 time_dist(PG_FUNCTION_ARGS)
 {
diff --git a/contrib/btree_gist/btree_ts.c b/contrib/btree_gist/btree_ts.c
index bf82709dd8657935d15a43aa81abae5fb63431f4..10f325d67202e77ca3ff7d6f7a01750e5d034406 100644
--- a/contrib/btree_gist/btree_ts.c
+++ b/contrib/btree_gist/btree_ts.c
@@ -28,17 +28,6 @@ PG_FUNCTION_INFO_V1(gbt_tstz_distance);
 PG_FUNCTION_INFO_V1(gbt_ts_penalty);
 PG_FUNCTION_INFO_V1(gbt_ts_same);
 
-Datum		gbt_ts_compress(PG_FUNCTION_ARGS);
-Datum		gbt_tstz_compress(PG_FUNCTION_ARGS);
-Datum		gbt_ts_union(PG_FUNCTION_ARGS);
-Datum		gbt_ts_picksplit(PG_FUNCTION_ARGS);
-Datum		gbt_ts_consistent(PG_FUNCTION_ARGS);
-Datum		gbt_ts_distance(PG_FUNCTION_ARGS);
-Datum		gbt_tstz_consistent(PG_FUNCTION_ARGS);
-Datum		gbt_tstz_distance(PG_FUNCTION_ARGS);
-Datum		gbt_ts_penalty(PG_FUNCTION_ARGS);
-Datum		gbt_ts_same(PG_FUNCTION_ARGS);
-
 
 #ifdef USE_FLOAT8_BYVAL
 #define TimestampGetDatumFast(X) TimestampGetDatum(X)
@@ -149,7 +138,6 @@ static const gbtree_ninfo tinfo =
 
 
 PG_FUNCTION_INFO_V1(ts_dist);
-Datum		ts_dist(PG_FUNCTION_ARGS);
 Datum
 ts_dist(PG_FUNCTION_ARGS)
 {
@@ -178,7 +166,6 @@ ts_dist(PG_FUNCTION_ARGS)
 }
 
 PG_FUNCTION_INFO_V1(tstz_dist);
-Datum		tstz_dist(PG_FUNCTION_ARGS);
 Datum
 tstz_dist(PG_FUNCTION_ARGS)
 {
diff --git a/contrib/btree_gist/btree_utils_var.c b/contrib/btree_gist/btree_utils_var.c
index c7c6faafc67e76a8aa9263b241d576d93067a2c9..09b51fc9c99cf23a9ca3d6acd1bd99177410aa93 100644
--- a/contrib/btree_gist/btree_utils_var.c
+++ b/contrib/btree_gist/btree_utils_var.c
@@ -29,7 +29,6 @@ typedef struct
 
 
 PG_FUNCTION_INFO_V1(gbt_var_decompress);
-Datum		gbt_var_decompress(PG_FUNCTION_ARGS);
 
 
 Datum
diff --git a/contrib/chkpass/chkpass.c b/contrib/chkpass/chkpass.c
index 1795b8cde4256f301440335ab24906d4fd72d634..283ad9a5388c6c340eb056a7c5a0214015ba1b3e 100644
--- a/contrib/chkpass/chkpass.c
+++ b/contrib/chkpass/chkpass.c
@@ -39,18 +39,6 @@ typedef struct chkpass
 	char		password[16];
 } chkpass;
 
-/*
- * Various forward declarations:
- */
-
-Datum		chkpass_in(PG_FUNCTION_ARGS);
-Datum		chkpass_out(PG_FUNCTION_ARGS);
-Datum		chkpass_rout(PG_FUNCTION_ARGS);
-
-/* Only equal or not equal make sense */
-Datum		chkpass_eq(PG_FUNCTION_ARGS);
-Datum		chkpass_ne(PG_FUNCTION_ARGS);
-
 
 /* This function checks that the password is a good one
  * It's just a placeholder for now */
diff --git a/contrib/citext/citext.c b/contrib/citext/citext.c
index a584f57455e7c44fbc9303d0518241661be95029..1174b70aa77f841f5161b8bc7fe5eed8d84fe1b0 100644
--- a/contrib/citext/citext.c
+++ b/contrib/citext/citext.c
@@ -19,16 +19,6 @@ PG_MODULE_MAGIC;
  */
 
 static int32 citextcmp(text *left, text *right, Oid collid);
-extern Datum citext_cmp(PG_FUNCTION_ARGS);
-extern Datum citext_hash(PG_FUNCTION_ARGS);
-extern Datum citext_eq(PG_FUNCTION_ARGS);
-extern Datum citext_ne(PG_FUNCTION_ARGS);
-extern Datum citext_gt(PG_FUNCTION_ARGS);
-extern Datum citext_ge(PG_FUNCTION_ARGS);
-extern Datum citext_lt(PG_FUNCTION_ARGS);
-extern Datum citext_le(PG_FUNCTION_ARGS);
-extern Datum citext_smaller(PG_FUNCTION_ARGS);
-extern Datum citext_larger(PG_FUNCTION_ARGS);
 
 /*
  *		=================
diff --git a/contrib/cube/cube.c b/contrib/cube/cube.c
index 9524943ca803a86c27d80406c512da8aaab50feb..906cc9efc7f7684253f5f50bafc83fa9f74f89dc 100644
--- a/contrib/cube/cube.c
+++ b/contrib/cube/cube.c
@@ -47,19 +47,6 @@ PG_FUNCTION_INFO_V1(cube_ll_coord);
 PG_FUNCTION_INFO_V1(cube_ur_coord);
 PG_FUNCTION_INFO_V1(cube_subset);
 
-Datum		cube_in(PG_FUNCTION_ARGS);
-Datum		cube_a_f8_f8(PG_FUNCTION_ARGS);
-Datum		cube_a_f8(PG_FUNCTION_ARGS);
-Datum		cube_out(PG_FUNCTION_ARGS);
-Datum		cube_f8(PG_FUNCTION_ARGS);
-Datum		cube_f8_f8(PG_FUNCTION_ARGS);
-Datum		cube_c_f8(PG_FUNCTION_ARGS);
-Datum		cube_c_f8_f8(PG_FUNCTION_ARGS);
-Datum		cube_dim(PG_FUNCTION_ARGS);
-Datum		cube_ll_coord(PG_FUNCTION_ARGS);
-Datum		cube_ur_coord(PG_FUNCTION_ARGS);
-Datum		cube_subset(PG_FUNCTION_ARGS);
-
 /*
 ** GiST support methods
 */
@@ -72,14 +59,6 @@ PG_FUNCTION_INFO_V1(g_cube_picksplit);
 PG_FUNCTION_INFO_V1(g_cube_union);
 PG_FUNCTION_INFO_V1(g_cube_same);
 
-Datum		g_cube_consistent(PG_FUNCTION_ARGS);
-Datum		g_cube_compress(PG_FUNCTION_ARGS);
-Datum		g_cube_decompress(PG_FUNCTION_ARGS);
-Datum		g_cube_penalty(PG_FUNCTION_ARGS);
-Datum		g_cube_picksplit(PG_FUNCTION_ARGS);
-Datum		g_cube_union(PG_FUNCTION_ARGS);
-Datum		g_cube_same(PG_FUNCTION_ARGS);
-
 /*
 ** B-tree support functions
 */
@@ -91,14 +70,6 @@ PG_FUNCTION_INFO_V1(cube_le);
 PG_FUNCTION_INFO_V1(cube_ge);
 PG_FUNCTION_INFO_V1(cube_cmp);
 
-Datum		cube_eq(PG_FUNCTION_ARGS);
-Datum		cube_ne(PG_FUNCTION_ARGS);
-Datum		cube_lt(PG_FUNCTION_ARGS);
-Datum		cube_gt(PG_FUNCTION_ARGS);
-Datum		cube_le(PG_FUNCTION_ARGS);
-Datum		cube_ge(PG_FUNCTION_ARGS);
-Datum		cube_cmp(PG_FUNCTION_ARGS);
-
 /*
 ** R-tree support functions
 */
@@ -110,13 +81,6 @@ PG_FUNCTION_INFO_V1(cube_union);
 PG_FUNCTION_INFO_V1(cube_inter);
 PG_FUNCTION_INFO_V1(cube_size);
 
-Datum		cube_contains(PG_FUNCTION_ARGS);
-Datum		cube_contained(PG_FUNCTION_ARGS);
-Datum		cube_overlap(PG_FUNCTION_ARGS);
-Datum		cube_union(PG_FUNCTION_ARGS);
-Datum		cube_inter(PG_FUNCTION_ARGS);
-Datum		cube_size(PG_FUNCTION_ARGS);
-
 /*
 ** miscellaneous
 */
@@ -124,10 +88,6 @@ PG_FUNCTION_INFO_V1(cube_distance);
 PG_FUNCTION_INFO_V1(cube_is_point);
 PG_FUNCTION_INFO_V1(cube_enlarge);
 
-Datum		cube_distance(PG_FUNCTION_ARGS);
-Datum		cube_is_point(PG_FUNCTION_ARGS);
-Datum		cube_enlarge(PG_FUNCTION_ARGS);
-
 /*
 ** For internal use only
 */
diff --git a/contrib/dict_int/dict_int.c b/contrib/dict_int/dict_int.c
index b05138e29de40c946c4652576aa04134bb78fa25..79067a86f088650c301e3a2ba9c1fcfe4b7e32b1 100644
--- a/contrib/dict_int/dict_int.c
+++ b/contrib/dict_int/dict_int.c
@@ -26,10 +26,7 @@ typedef struct
 
 
 PG_FUNCTION_INFO_V1(dintdict_init);
-Datum		dintdict_init(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(dintdict_lexize);
-Datum		dintdict_lexize(PG_FUNCTION_ARGS);
 
 Datum
 dintdict_init(PG_FUNCTION_ARGS)
diff --git a/contrib/dict_xsyn/dict_xsyn.c b/contrib/dict_xsyn/dict_xsyn.c
index f0084a96c4b589fd662fec8fcce1cf71b3d1ef38..1c27565f5edeb8a0f5c2be06d136e8bcc73ac88b 100644
--- a/contrib/dict_xsyn/dict_xsyn.c
+++ b/contrib/dict_xsyn/dict_xsyn.c
@@ -40,10 +40,7 @@ typedef struct
 
 
 PG_FUNCTION_INFO_V1(dxsyn_init);
-Datum		dxsyn_init(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(dxsyn_lexize);
-Datum		dxsyn_lexize(PG_FUNCTION_ARGS);
 
 static char *
 find_word(char *in, char **end)
diff --git a/contrib/earthdistance/earthdistance.c b/contrib/earthdistance/earthdistance.c
index 2f344a70116a8f9e09800b0ecc169d1abac665ef..eadfce4605475e850f198ec93d5267c061940974 100644
--- a/contrib/earthdistance/earthdistance.c
+++ b/contrib/earthdistance/earthdistance.c
@@ -99,8 +99,6 @@ geo_distance_internal(Point *pt1, Point *pt2)
 
 #ifdef USE_FLOAT8_BYVAL
 
-Datum		geo_distance(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(geo_distance);
 
 Datum
diff --git a/contrib/file_fdw/file_fdw.c b/contrib/file_fdw/file_fdw.c
index 7fb1dbcff3ad68455266f57f213c220f4991210b..4f84e3bcea8bee11f37662f24e6be402aa062dc3 100644
--- a/contrib/file_fdw/file_fdw.c
+++ b/contrib/file_fdw/file_fdw.c
@@ -102,9 +102,6 @@ typedef struct FileFdwExecutionState
 /*
  * SQL functions
  */
-extern Datum file_fdw_handler(PG_FUNCTION_ARGS);
-extern Datum file_fdw_validator(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(file_fdw_handler);
 PG_FUNCTION_INFO_V1(file_fdw_validator);
 
diff --git a/contrib/fuzzystrmatch/dmetaphone.c b/contrib/fuzzystrmatch/dmetaphone.c
index 19413b481a0c2ed3dbffe0b79f930f84e40144d8..5001288bb6424416c8c0b2fc5ea5d49b4aeeb22f 100644
--- a/contrib/fuzzystrmatch/dmetaphone.c
+++ b/contrib/fuzzystrmatch/dmetaphone.c
@@ -114,9 +114,6 @@ The remaining code is authored by Andrew Dunstan <amdunstan@ncshp.org> and
 #include <stdarg.h>
 #include <assert.h>
 
-extern Datum dmetaphone(PG_FUNCTION_ARGS);
-extern Datum dmetaphone_alt(PG_FUNCTION_ARGS);
-
 /* prototype for the main function we got from the perl module */
 static void DoubleMetaphone(char *, char **);
 
diff --git a/contrib/fuzzystrmatch/fuzzystrmatch.c b/contrib/fuzzystrmatch/fuzzystrmatch.c
index 218eced92165b2838eee0fe4978ee7e247604629..7a53d8a008e1193e07ca5ad38766ad7915d25434 100644
--- a/contrib/fuzzystrmatch/fuzzystrmatch.c
+++ b/contrib/fuzzystrmatch/fuzzystrmatch.c
@@ -45,18 +45,6 @@
 
 PG_MODULE_MAGIC;
 
-
-/*
- * External declarations for exported functions
- */
-extern Datum levenshtein_with_costs(PG_FUNCTION_ARGS);
-extern Datum levenshtein(PG_FUNCTION_ARGS);
-extern Datum levenshtein_less_equal_with_costs(PG_FUNCTION_ARGS);
-extern Datum levenshtein_less_equal(PG_FUNCTION_ARGS);
-extern Datum metaphone(PG_FUNCTION_ARGS);
-extern Datum soundex(PG_FUNCTION_ARGS);
-extern Datum difference(PG_FUNCTION_ARGS);
-
 /*
  * Soundex
  */
diff --git a/contrib/hstore/hstore.h b/contrib/hstore/hstore.h
index 37e46118531ab83fd9b5863f4cf186dd2165e5c6..382111617a01bf7359219c40f60ac4461d60d73b 100644
--- a/contrib/hstore/hstore.h
+++ b/contrib/hstore/hstore.h
@@ -194,7 +194,6 @@ extern Pairs *hstoreArrayToPairs(ArrayType *a, int *npairs);
 #if HSTORE_POLLUTE_NAMESPACE
 #define HSTORE_POLLUTE(newname_,oldname_) \
 	PG_FUNCTION_INFO_V1(oldname_);		  \
-	Datum oldname_(PG_FUNCTION_ARGS);	  \
 	Datum newname_(PG_FUNCTION_ARGS);	  \
 	Datum oldname_(PG_FUNCTION_ARGS) { return newname_(fcinfo); } \
 	extern int no_such_variable
diff --git a/contrib/hstore/hstore_compat.c b/contrib/hstore/hstore_compat.c
index 6327a8e8bb58a5c6e32e8884690ee5b5ece53417..6364f032f98bac8bb8a2cabb20bf6c530ecc5183 100644
--- a/contrib/hstore/hstore_compat.c
+++ b/contrib/hstore/hstore_compat.c
@@ -357,7 +357,6 @@ hstoreUpgrade(Datum orig)
 
 
 PG_FUNCTION_INFO_V1(hstore_version_diag);
-Datum		hstore_version_diag(PG_FUNCTION_ARGS);
 Datum
 hstore_version_diag(PG_FUNCTION_ARGS)
 {
diff --git a/contrib/hstore/hstore_gin.c b/contrib/hstore/hstore_gin.c
index 2007801cf0c97300cc201af5a19cdfd9f3c14a04..9f2de06f7fe301d083ed99b2253e0118c661c2df 100644
--- a/contrib/hstore/hstore_gin.c
+++ b/contrib/hstore/hstore_gin.c
@@ -22,7 +22,6 @@
 #define NULLFLAG	'N'
 
 PG_FUNCTION_INFO_V1(gin_extract_hstore);
-Datum		gin_extract_hstore(PG_FUNCTION_ARGS);
 
 /* Build an indexable text value */
 static text *
@@ -76,7 +75,6 @@ gin_extract_hstore(PG_FUNCTION_ARGS)
 }
 
 PG_FUNCTION_INFO_V1(gin_extract_hstore_query);
-Datum		gin_extract_hstore_query(PG_FUNCTION_ARGS);
 
 Datum
 gin_extract_hstore_query(PG_FUNCTION_ARGS)
@@ -148,7 +146,6 @@ gin_extract_hstore_query(PG_FUNCTION_ARGS)
 }
 
 PG_FUNCTION_INFO_V1(gin_consistent_hstore);
-Datum		gin_consistent_hstore(PG_FUNCTION_ARGS);
 
 Datum
 gin_consistent_hstore(PG_FUNCTION_ARGS)
diff --git a/contrib/hstore/hstore_gist.c b/contrib/hstore/hstore_gist.c
index 900118014249df96b69792581ea223e693b81b43..d4a9aaa4c13085814093060f4388301f5c00768a 100644
--- a/contrib/hstore/hstore_gist.c
+++ b/contrib/hstore/hstore_gist.c
@@ -69,10 +69,7 @@ typedef struct
 #define WISH_F(a,b,c) (double)( -(double)(((a)-(b))*((a)-(b))*((a)-(b)))*(c) )
 
 PG_FUNCTION_INFO_V1(ghstore_in);
-Datum		ghstore_in(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(ghstore_out);
-Datum		ghstore_out(PG_FUNCTION_ARGS);
 
 
 Datum
@@ -97,14 +94,6 @@ PG_FUNCTION_INFO_V1(ghstore_picksplit);
 PG_FUNCTION_INFO_V1(ghstore_union);
 PG_FUNCTION_INFO_V1(ghstore_same);
 
-Datum		ghstore_consistent(PG_FUNCTION_ARGS);
-Datum		ghstore_compress(PG_FUNCTION_ARGS);
-Datum		ghstore_decompress(PG_FUNCTION_ARGS);
-Datum		ghstore_penalty(PG_FUNCTION_ARGS);
-Datum		ghstore_picksplit(PG_FUNCTION_ARGS);
-Datum		ghstore_union(PG_FUNCTION_ARGS);
-Datum		ghstore_same(PG_FUNCTION_ARGS);
-
 Datum
 ghstore_compress(PG_FUNCTION_ARGS)
 {
diff --git a/contrib/hstore/hstore_io.c b/contrib/hstore/hstore_io.c
index 6ec0b9cbf19ea60de751ba1854d1451d88f8c013..9899317bfca33cc6a66a75458f538f14dec8fe61 100644
--- a/contrib/hstore/hstore_io.c
+++ b/contrib/hstore/hstore_io.c
@@ -401,7 +401,6 @@ hstorePairs(Pairs *pairs, int32 pcount, int32 buflen)
 
 
 PG_FUNCTION_INFO_V1(hstore_in);
-Datum		hstore_in(PG_FUNCTION_ARGS);
 Datum
 hstore_in(PG_FUNCTION_ARGS)
 {
@@ -422,7 +421,6 @@ hstore_in(PG_FUNCTION_ARGS)
 
 
 PG_FUNCTION_INFO_V1(hstore_recv);
-Datum		hstore_recv(PG_FUNCTION_ARGS);
 Datum
 hstore_recv(PG_FUNCTION_ARGS)
 {
@@ -486,7 +484,6 @@ hstore_recv(PG_FUNCTION_ARGS)
 
 
 PG_FUNCTION_INFO_V1(hstore_from_text);
-Datum		hstore_from_text(PG_FUNCTION_ARGS);
 Datum
 hstore_from_text(PG_FUNCTION_ARGS)
 {
@@ -523,7 +520,6 @@ hstore_from_text(PG_FUNCTION_ARGS)
 
 
 PG_FUNCTION_INFO_V1(hstore_from_arrays);
-Datum		hstore_from_arrays(PG_FUNCTION_ARGS);
 Datum
 hstore_from_arrays(PG_FUNCTION_ARGS)
 {
@@ -641,7 +637,6 @@ hstore_from_arrays(PG_FUNCTION_ARGS)
 
 
 PG_FUNCTION_INFO_V1(hstore_from_array);
-Datum		hstore_from_array(PG_FUNCTION_ARGS);
 Datum
 hstore_from_array(PG_FUNCTION_ARGS)
 {
@@ -755,7 +750,6 @@ typedef struct RecordIOData
 } RecordIOData;
 
 PG_FUNCTION_INFO_V1(hstore_from_record);
-Datum		hstore_from_record(PG_FUNCTION_ARGS);
 Datum
 hstore_from_record(PG_FUNCTION_ARGS)
 {
@@ -909,7 +903,6 @@ hstore_from_record(PG_FUNCTION_ARGS)
 
 
 PG_FUNCTION_INFO_V1(hstore_populate_record);
-Datum		hstore_populate_record(PG_FUNCTION_ARGS);
 Datum
 hstore_populate_record(PG_FUNCTION_ARGS)
 {
@@ -1122,7 +1115,6 @@ cpw(char *dst, char *src, int len)
 }
 
 PG_FUNCTION_INFO_V1(hstore_out);
-Datum		hstore_out(PG_FUNCTION_ARGS);
 Datum
 hstore_out(PG_FUNCTION_ARGS)
 {
@@ -1194,7 +1186,6 @@ hstore_out(PG_FUNCTION_ARGS)
 
 
 PG_FUNCTION_INFO_V1(hstore_send);
-Datum		hstore_send(PG_FUNCTION_ARGS);
 Datum
 hstore_send(PG_FUNCTION_ARGS)
 {
@@ -1241,7 +1232,6 @@ hstore_send(PG_FUNCTION_ARGS)
  * (think zip codes or phone numbers starting with 0).
  */
 PG_FUNCTION_INFO_V1(hstore_to_json_loose);
-Datum		hstore_to_json_loose(PG_FUNCTION_ARGS);
 Datum
 hstore_to_json_loose(PG_FUNCTION_ARGS)
 {
@@ -1333,7 +1323,6 @@ hstore_to_json_loose(PG_FUNCTION_ARGS)
 }
 
 PG_FUNCTION_INFO_V1(hstore_to_json);
-Datum		hstore_to_json(PG_FUNCTION_ARGS);
 Datum
 hstore_to_json(PG_FUNCTION_ARGS)
 {
@@ -1377,7 +1366,6 @@ hstore_to_json(PG_FUNCTION_ARGS)
 }
 
 PG_FUNCTION_INFO_V1(hstore_to_jsonb);
-Datum		hstore_to_jsonb(PG_FUNCTION_ARGS);
 Datum
 hstore_to_jsonb(PG_FUNCTION_ARGS)
 {
@@ -1425,7 +1413,6 @@ hstore_to_jsonb(PG_FUNCTION_ARGS)
 }
 
 PG_FUNCTION_INFO_V1(hstore_to_jsonb_loose);
-Datum		hstore_to_jsonb_loose(PG_FUNCTION_ARGS);
 Datum
 hstore_to_jsonb_loose(PG_FUNCTION_ARGS)
 {
diff --git a/contrib/hstore/hstore_op.c b/contrib/hstore/hstore_op.c
index 8ba7a05a6593cdee42137ae6ebfa6613d7477a38..9e18a2b5128b416cdbabcc2cf03092afb90f0817 100644
--- a/contrib/hstore/hstore_op.c
+++ b/contrib/hstore/hstore_op.c
@@ -127,7 +127,6 @@ hstoreArrayToPairs(ArrayType *a, int *npairs)
 
 
 PG_FUNCTION_INFO_V1(hstore_fetchval);
-Datum		hstore_fetchval(PG_FUNCTION_ARGS);
 Datum
 hstore_fetchval(PG_FUNCTION_ARGS)
 {
@@ -149,7 +148,6 @@ hstore_fetchval(PG_FUNCTION_ARGS)
 
 
 PG_FUNCTION_INFO_V1(hstore_exists);
-Datum		hstore_exists(PG_FUNCTION_ARGS);
 Datum
 hstore_exists(PG_FUNCTION_ARGS)
 {
@@ -163,7 +161,6 @@ hstore_exists(PG_FUNCTION_ARGS)
 
 
 PG_FUNCTION_INFO_V1(hstore_exists_any);
-Datum		hstore_exists_any(PG_FUNCTION_ARGS);
 Datum
 hstore_exists_any(PG_FUNCTION_ARGS)
 {
@@ -198,7 +195,6 @@ hstore_exists_any(PG_FUNCTION_ARGS)
 
 
 PG_FUNCTION_INFO_V1(hstore_exists_all);
-Datum		hstore_exists_all(PG_FUNCTION_ARGS);
 Datum
 hstore_exists_all(PG_FUNCTION_ARGS)
 {
@@ -233,7 +229,6 @@ hstore_exists_all(PG_FUNCTION_ARGS)
 
 
 PG_FUNCTION_INFO_V1(hstore_defined);
-Datum		hstore_defined(PG_FUNCTION_ARGS);
 Datum
 hstore_defined(PG_FUNCTION_ARGS)
 {
@@ -249,7 +244,6 @@ hstore_defined(PG_FUNCTION_ARGS)
 
 
 PG_FUNCTION_INFO_V1(hstore_delete);
-Datum		hstore_delete(PG_FUNCTION_ARGS);
 Datum
 hstore_delete(PG_FUNCTION_ARGS)
 {
@@ -296,7 +290,6 @@ hstore_delete(PG_FUNCTION_ARGS)
 
 
 PG_FUNCTION_INFO_V1(hstore_delete_array);
-Datum		hstore_delete_array(PG_FUNCTION_ARGS);
 Datum
 hstore_delete_array(PG_FUNCTION_ARGS)
 {
@@ -376,7 +369,6 @@ hstore_delete_array(PG_FUNCTION_ARGS)
 
 
 PG_FUNCTION_INFO_V1(hstore_delete_hstore);
-Datum		hstore_delete_hstore(PG_FUNCTION_ARGS);
 Datum
 hstore_delete_hstore(PG_FUNCTION_ARGS)
 {
@@ -476,7 +468,6 @@ hstore_delete_hstore(PG_FUNCTION_ARGS)
 
 
 PG_FUNCTION_INFO_V1(hstore_concat);
-Datum		hstore_concat(PG_FUNCTION_ARGS);
 Datum
 hstore_concat(PG_FUNCTION_ARGS)
 {
@@ -575,7 +566,6 @@ hstore_concat(PG_FUNCTION_ARGS)
 
 
 PG_FUNCTION_INFO_V1(hstore_slice_to_array);
-Datum		hstore_slice_to_array(PG_FUNCTION_ARGS);
 Datum
 hstore_slice_to_array(PG_FUNCTION_ARGS)
 {
@@ -639,7 +629,6 @@ hstore_slice_to_array(PG_FUNCTION_ARGS)
 
 
 PG_FUNCTION_INFO_V1(hstore_slice_to_hstore);
-Datum		hstore_slice_to_hstore(PG_FUNCTION_ARGS);
 Datum
 hstore_slice_to_hstore(PG_FUNCTION_ARGS)
 {
@@ -702,7 +691,6 @@ hstore_slice_to_hstore(PG_FUNCTION_ARGS)
 
 
 PG_FUNCTION_INFO_V1(hstore_akeys);
-Datum		hstore_akeys(PG_FUNCTION_ARGS);
 Datum
 hstore_akeys(PG_FUNCTION_ARGS)
 {
@@ -738,7 +726,6 @@ hstore_akeys(PG_FUNCTION_ARGS)
 
 
 PG_FUNCTION_INFO_V1(hstore_avals);
-Datum		hstore_avals(PG_FUNCTION_ARGS);
 Datum
 hstore_avals(PG_FUNCTION_ARGS)
 {
@@ -835,7 +822,6 @@ hstore_to_array_internal(HStore *hs, int ndims)
 }
 
 PG_FUNCTION_INFO_V1(hstore_to_array);
-Datum		hstore_to_array(PG_FUNCTION_ARGS);
 Datum
 hstore_to_array(PG_FUNCTION_ARGS)
 {
@@ -846,7 +832,6 @@ hstore_to_array(PG_FUNCTION_ARGS)
 }
 
 PG_FUNCTION_INFO_V1(hstore_to_matrix);
-Datum		hstore_to_matrix(PG_FUNCTION_ARGS);
 Datum
 hstore_to_matrix(PG_FUNCTION_ARGS)
 {
@@ -895,7 +880,6 @@ setup_firstcall(FuncCallContext *funcctx, HStore *hs,
 
 
 PG_FUNCTION_INFO_V1(hstore_skeys);
-Datum		hstore_skeys(PG_FUNCTION_ARGS);
 Datum
 hstore_skeys(PG_FUNCTION_ARGS)
 {
@@ -930,7 +914,6 @@ hstore_skeys(PG_FUNCTION_ARGS)
 
 
 PG_FUNCTION_INFO_V1(hstore_svals);
-Datum		hstore_svals(PG_FUNCTION_ARGS);
 Datum
 hstore_svals(PG_FUNCTION_ARGS)
 {
@@ -979,7 +962,6 @@ hstore_svals(PG_FUNCTION_ARGS)
 
 
 PG_FUNCTION_INFO_V1(hstore_contains);
-Datum		hstore_contains(PG_FUNCTION_ARGS);
 Datum
 hstore_contains(PG_FUNCTION_ARGS)
 {
@@ -1026,7 +1008,6 @@ hstore_contains(PG_FUNCTION_ARGS)
 
 
 PG_FUNCTION_INFO_V1(hstore_contained);
-Datum		hstore_contained(PG_FUNCTION_ARGS);
 Datum
 hstore_contained(PG_FUNCTION_ARGS)
 {
@@ -1038,7 +1019,6 @@ hstore_contained(PG_FUNCTION_ARGS)
 
 
 PG_FUNCTION_INFO_V1(hstore_each);
-Datum		hstore_each(PG_FUNCTION_ARGS);
 Datum
 hstore_each(PG_FUNCTION_ARGS)
 {
@@ -1100,7 +1080,6 @@ hstore_each(PG_FUNCTION_ARGS)
  */
 
 PG_FUNCTION_INFO_V1(hstore_cmp);
-Datum		hstore_cmp(PG_FUNCTION_ARGS);
 Datum
 hstore_cmp(PG_FUNCTION_ARGS)
 {
@@ -1182,7 +1161,6 @@ hstore_cmp(PG_FUNCTION_ARGS)
 
 
 PG_FUNCTION_INFO_V1(hstore_eq);
-Datum		hstore_eq(PG_FUNCTION_ARGS);
 Datum
 hstore_eq(PG_FUNCTION_ARGS)
 {
@@ -1194,7 +1172,6 @@ hstore_eq(PG_FUNCTION_ARGS)
 }
 
 PG_FUNCTION_INFO_V1(hstore_ne);
-Datum		hstore_ne(PG_FUNCTION_ARGS);
 Datum
 hstore_ne(PG_FUNCTION_ARGS)
 {
@@ -1206,7 +1183,6 @@ hstore_ne(PG_FUNCTION_ARGS)
 }
 
 PG_FUNCTION_INFO_V1(hstore_gt);
-Datum		hstore_gt(PG_FUNCTION_ARGS);
 Datum
 hstore_gt(PG_FUNCTION_ARGS)
 {
@@ -1218,7 +1194,6 @@ hstore_gt(PG_FUNCTION_ARGS)
 }
 
 PG_FUNCTION_INFO_V1(hstore_ge);
-Datum		hstore_ge(PG_FUNCTION_ARGS);
 Datum
 hstore_ge(PG_FUNCTION_ARGS)
 {
@@ -1230,7 +1205,6 @@ hstore_ge(PG_FUNCTION_ARGS)
 }
 
 PG_FUNCTION_INFO_V1(hstore_lt);
-Datum		hstore_lt(PG_FUNCTION_ARGS);
 Datum
 hstore_lt(PG_FUNCTION_ARGS)
 {
@@ -1242,7 +1216,6 @@ hstore_lt(PG_FUNCTION_ARGS)
 }
 
 PG_FUNCTION_INFO_V1(hstore_le);
-Datum		hstore_le(PG_FUNCTION_ARGS);
 Datum
 hstore_le(PG_FUNCTION_ARGS)
 {
@@ -1255,7 +1228,6 @@ hstore_le(PG_FUNCTION_ARGS)
 
 
 PG_FUNCTION_INFO_V1(hstore_hash);
-Datum		hstore_hash(PG_FUNCTION_ARGS);
 Datum
 hstore_hash(PG_FUNCTION_ARGS)
 {
diff --git a/contrib/intarray/_int_bool.c b/contrib/intarray/_int_bool.c
index b18e997748be68a38e08547aeb8bbee7cf68b1ca..566a6c25056849e8591b99f664ed06d069da7ded 100644
--- a/contrib/intarray/_int_bool.c
+++ b/contrib/intarray/_int_bool.c
@@ -10,17 +10,9 @@
 
 PG_FUNCTION_INFO_V1(bqarr_in);
 PG_FUNCTION_INFO_V1(bqarr_out);
-Datum		bqarr_in(PG_FUNCTION_ARGS);
-Datum		bqarr_out(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(boolop);
-Datum		boolop(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(rboolop);
-Datum		rboolop(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(querytree);
-Datum		querytree(PG_FUNCTION_ARGS);
 
 
 /* parser's states */
diff --git a/contrib/intarray/_int_gin.c b/contrib/intarray/_int_gin.c
index be71e5ce6961b5adb706fdc1b7b54b575919e42f..58352cac807a2dae8ff8187c2490ab43b6fffb35 100644
--- a/contrib/intarray/_int_gin.c
+++ b/contrib/intarray/_int_gin.c
@@ -10,7 +10,6 @@
 #include "_int.h"
 
 PG_FUNCTION_INFO_V1(ginint4_queryextract);
-Datum		ginint4_queryextract(PG_FUNCTION_ARGS);
 
 Datum
 ginint4_queryextract(PG_FUNCTION_ARGS)
@@ -108,7 +107,6 @@ ginint4_queryextract(PG_FUNCTION_ARGS)
 }
 
 PG_FUNCTION_INFO_V1(ginint4_consistent);
-Datum		ginint4_consistent(PG_FUNCTION_ARGS);
 
 Datum
 ginint4_consistent(PG_FUNCTION_ARGS)
diff --git a/contrib/intarray/_int_gist.c b/contrib/intarray/_int_gist.c
index 60de393bdf1d665d1a6fe60729cb6e9eda1f6257..d64a81a5595e26f6289f4edcd45152ad3e987013 100644
--- a/contrib/intarray/_int_gist.c
+++ b/contrib/intarray/_int_gist.c
@@ -21,14 +21,6 @@ PG_FUNCTION_INFO_V1(g_int_picksplit);
 PG_FUNCTION_INFO_V1(g_int_union);
 PG_FUNCTION_INFO_V1(g_int_same);
 
-Datum		g_int_consistent(PG_FUNCTION_ARGS);
-Datum		g_int_compress(PG_FUNCTION_ARGS);
-Datum		g_int_decompress(PG_FUNCTION_ARGS);
-Datum		g_int_penalty(PG_FUNCTION_ARGS);
-Datum		g_int_picksplit(PG_FUNCTION_ARGS);
-Datum		g_int_union(PG_FUNCTION_ARGS);
-Datum		g_int_same(PG_FUNCTION_ARGS);
-
 
 /*
 ** The GiST Consistent method for _intments
diff --git a/contrib/intarray/_int_op.c b/contrib/intarray/_int_op.c
index 4c2aa7af8b5cfcd2ffcba6f9093ae2fc5903c1ca..70849be57f4fc6df45efd5833824b2cec5532989 100644
--- a/contrib/intarray/_int_op.c
+++ b/contrib/intarray/_int_op.c
@@ -17,14 +17,6 @@ PG_FUNCTION_INFO_V1(_int_overlap);
 PG_FUNCTION_INFO_V1(_int_union);
 PG_FUNCTION_INFO_V1(_int_inter);
 
-Datum		_int_different(PG_FUNCTION_ARGS);
-Datum		_int_same(PG_FUNCTION_ARGS);
-Datum		_int_contains(PG_FUNCTION_ARGS);
-Datum		_int_contained(PG_FUNCTION_ARGS);
-Datum		_int_overlap(PG_FUNCTION_ARGS);
-Datum		_int_union(PG_FUNCTION_ARGS);
-Datum		_int_inter(PG_FUNCTION_ARGS);
-
 Datum
 _int_contained(PG_FUNCTION_ARGS)
 {
@@ -188,19 +180,6 @@ PG_FUNCTION_INFO_V1(intarray_push_array);
 PG_FUNCTION_INFO_V1(intarray_del_elem);
 PG_FUNCTION_INFO_V1(intset_union_elem);
 PG_FUNCTION_INFO_V1(intset_subtract);
-Datum		intset(PG_FUNCTION_ARGS);
-Datum		icount(PG_FUNCTION_ARGS);
-Datum		sort(PG_FUNCTION_ARGS);
-Datum		sort_asc(PG_FUNCTION_ARGS);
-Datum		sort_desc(PG_FUNCTION_ARGS);
-Datum		uniq(PG_FUNCTION_ARGS);
-Datum		idx(PG_FUNCTION_ARGS);
-Datum		subarray(PG_FUNCTION_ARGS);
-Datum		intarray_push_elem(PG_FUNCTION_ARGS);
-Datum		intarray_push_array(PG_FUNCTION_ARGS);
-Datum		intarray_del_elem(PG_FUNCTION_ARGS);
-Datum		intset_union_elem(PG_FUNCTION_ARGS);
-Datum		intset_subtract(PG_FUNCTION_ARGS);
 
 Datum
 intset(PG_FUNCTION_ARGS)
diff --git a/contrib/intarray/_intbig_gist.c b/contrib/intarray/_intbig_gist.c
index 1bad024c099d192b65160ff7d4f5666247692a66..235db3895727c6e3b92ffa425f21aa050d7758d5 100644
--- a/contrib/intarray/_intbig_gist.c
+++ b/contrib/intarray/_intbig_gist.c
@@ -20,14 +20,6 @@ PG_FUNCTION_INFO_V1(g_intbig_picksplit);
 PG_FUNCTION_INFO_V1(g_intbig_union);
 PG_FUNCTION_INFO_V1(g_intbig_same);
 
-Datum		g_intbig_consistent(PG_FUNCTION_ARGS);
-Datum		g_intbig_compress(PG_FUNCTION_ARGS);
-Datum		g_intbig_decompress(PG_FUNCTION_ARGS);
-Datum		g_intbig_penalty(PG_FUNCTION_ARGS);
-Datum		g_intbig_picksplit(PG_FUNCTION_ARGS);
-Datum		g_intbig_union(PG_FUNCTION_ARGS);
-Datum		g_intbig_same(PG_FUNCTION_ARGS);
-
 /* Number of one-bits in an unsigned byte */
 static const uint8 number_of_ones[256] = {
 	0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4,
@@ -49,11 +41,7 @@ static const uint8 number_of_ones[256] = {
 };
 
 PG_FUNCTION_INFO_V1(_intbig_in);
-Datum		_intbig_in(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(_intbig_out);
-Datum		_intbig_out(PG_FUNCTION_ARGS);
-
 
 Datum
 _intbig_in(PG_FUNCTION_ARGS)
diff --git a/contrib/lo/lo.c b/contrib/lo/lo.c
index 757758fe7f8f439b7422c95a561815658c67938c..4dee64724d6e7ffb38389374fe85a2a2e764f8b5 100644
--- a/contrib/lo/lo.c
+++ b/contrib/lo/lo.c
@@ -18,10 +18,6 @@ PG_MODULE_MAGIC;
 #define atooid(x)  ((Oid) strtoul((x), NULL, 10))
 
 
-/* forward declarations */
-Datum		lo_manage(PG_FUNCTION_ARGS);
-
-
 /*
  * This is the trigger that protects us from orphaned large objects
  */
diff --git a/contrib/ltree/_ltree_gist.c b/contrib/ltree/_ltree_gist.c
index 93507158c02de047c127af92233c42b4cde366a9..41be68d7ee669db44c2dd65d6eeaecc87b413d28 100644
--- a/contrib/ltree/_ltree_gist.c
+++ b/contrib/ltree/_ltree_gist.c
@@ -14,22 +14,11 @@
 
 
 PG_FUNCTION_INFO_V1(_ltree_compress);
-Datum		_ltree_compress(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(_ltree_same);
-Datum		_ltree_same(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(_ltree_union);
-Datum		_ltree_union(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(_ltree_penalty);
-Datum		_ltree_penalty(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(_ltree_picksplit);
-Datum		_ltree_picksplit(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(_ltree_consistent);
-Datum		_ltree_consistent(PG_FUNCTION_ARGS);
 
 #define GETENTRY(vec,pos) ((ltree_gist *) DatumGetPointer((vec)->vector[(pos)].key))
 #define NEXTVAL(x) ( (ltree*)( (char*)(x) + INTALIGN( VARSIZE(x) ) ) )
diff --git a/contrib/ltree/_ltree_op.c b/contrib/ltree/_ltree_op.c
index 1b53af816d91c4e054624df6e603dcd624f891ad..44270d4614a682539003e0851bd6984198764ae6 100644
--- a/contrib/ltree/_ltree_op.c
+++ b/contrib/ltree/_ltree_op.c
@@ -22,20 +22,12 @@ PG_FUNCTION_INFO_V1(_lt_q_rregex);
 PG_FUNCTION_INFO_V1(_ltxtq_exec);
 PG_FUNCTION_INFO_V1(_ltxtq_rexec);
 
-Datum		_ltree_r_isparent(PG_FUNCTION_ARGS);
-Datum		_ltree_r_risparent(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(_ltree_extract_isparent);
 PG_FUNCTION_INFO_V1(_ltree_extract_risparent);
 PG_FUNCTION_INFO_V1(_ltq_extract_regex);
 PG_FUNCTION_INFO_V1(_ltxtq_extract_exec);
-Datum		_ltree_extract_isparent(PG_FUNCTION_ARGS);
-Datum		_ltree_extract_risparent(PG_FUNCTION_ARGS);
-Datum		_ltq_extract_regex(PG_FUNCTION_ARGS);
-Datum		_ltxtq_extract_exec(PG_FUNCTION_ARGS);
 
 PG_FUNCTION_INFO_V1(_lca);
-Datum		_lca(PG_FUNCTION_ARGS);
 
 typedef Datum (*PGCALL2) (PG_FUNCTION_ARGS);
 
diff --git a/contrib/ltree/ltree_gist.c b/contrib/ltree/ltree_gist.c
index 5324c65f59ef86be0bad50f24104cbb0e2e0c102..2d89f1aed4c6ff7bbca5c4896b9d3acbbebfc417 100644
--- a/contrib/ltree/ltree_gist.c
+++ b/contrib/ltree/ltree_gist.c
@@ -13,10 +13,7 @@
 #define NEXTVAL(x) ( (lquery*)( (char*)(x) + INTALIGN( VARSIZE(x) ) ) )
 
 PG_FUNCTION_INFO_V1(ltree_gist_in);
-Datum		ltree_gist_in(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(ltree_gist_out);
-Datum		ltree_gist_out(PG_FUNCTION_ARGS);
 
 Datum
 ltree_gist_in(PG_FUNCTION_ARGS)
@@ -37,25 +34,12 @@ ltree_gist_out(PG_FUNCTION_ARGS)
 }
 
 PG_FUNCTION_INFO_V1(ltree_compress);
-Datum		ltree_compress(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(ltree_decompress);
-Datum		ltree_decompress(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(ltree_same);
-Datum		ltree_same(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(ltree_union);
-Datum		ltree_union(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(ltree_penalty);
-Datum		ltree_penalty(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(ltree_picksplit);
-Datum		ltree_picksplit(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(ltree_consistent);
-Datum		ltree_consistent(PG_FUNCTION_ARGS);
 
 #define ISEQ(a,b)	( (a)->numlevel == (b)->numlevel && ltree_compare(a,b)==0 )
 #define GETENTRY(vec,pos) ((ltree_gist *) DatumGetPointer((vec)->vector[(pos)].key))
diff --git a/contrib/ltree/ltree_io.c b/contrib/ltree/ltree_io.c
index d64debb5f49bc384c656fd8218f76a2319f90f34..a1d4a0d38faf493072194fb5fdf98fd2565c1e58 100644
--- a/contrib/ltree/ltree_io.c
+++ b/contrib/ltree/ltree_io.c
@@ -12,16 +12,9 @@
 #include "crc32.h"
 
 PG_FUNCTION_INFO_V1(ltree_in);
-Datum		ltree_in(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(ltree_out);
-Datum		ltree_out(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(lquery_in);
-Datum		lquery_in(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(lquery_out);
-Datum		lquery_out(PG_FUNCTION_ARGS);
 
 
 #define UNCHAR ereport(ERROR, \
diff --git a/contrib/ltree/ltree_op.c b/contrib/ltree/ltree_op.c
index 25b6db1b1aab33883e64a64a995fa1e4da7b5d80..992106f05ac18f04b48f2f38a7f3763ff4a92527 100644
--- a/contrib/ltree/ltree_op.c
+++ b/contrib/ltree/ltree_op.c
@@ -38,25 +38,6 @@ PG_FUNCTION_INFO_V1(ltree2text);
 PG_FUNCTION_INFO_V1(text2ltree);
 PG_FUNCTION_INFO_V1(ltreeparentsel);
 
-Datum		ltree_cmp(PG_FUNCTION_ARGS);
-Datum		ltree_lt(PG_FUNCTION_ARGS);
-Datum		ltree_le(PG_FUNCTION_ARGS);
-Datum		ltree_eq(PG_FUNCTION_ARGS);
-Datum		ltree_ne(PG_FUNCTION_ARGS);
-Datum		ltree_ge(PG_FUNCTION_ARGS);
-Datum		ltree_gt(PG_FUNCTION_ARGS);
-Datum		nlevel(PG_FUNCTION_ARGS);
-Datum		subltree(PG_FUNCTION_ARGS);
-Datum		subpath(PG_FUNCTION_ARGS);
-Datum		ltree_index(PG_FUNCTION_ARGS);
-Datum		ltree_addltree(PG_FUNCTION_ARGS);
-Datum		ltree_addtext(PG_FUNCTION_ARGS);
-Datum		ltree_textadd(PG_FUNCTION_ARGS);
-Datum		lca(PG_FUNCTION_ARGS);
-Datum		ltree2text(PG_FUNCTION_ARGS);
-Datum		text2ltree(PG_FUNCTION_ARGS);
-Datum		ltreeparentsel(PG_FUNCTION_ARGS);
-
 int
 ltree_compare(const ltree *a, const ltree *b)
 {
diff --git a/contrib/ltree/ltxtquery_io.c b/contrib/ltree/ltxtquery_io.c
index 982186581a3aa94fb5dea5c273ca61b9ac65d94f..ddc63d7b66b193599fdc92591db58138d7965896 100644
--- a/contrib/ltree/ltxtquery_io.c
+++ b/contrib/ltree/ltxtquery_io.c
@@ -12,10 +12,7 @@
 #include "miscadmin.h"
 
 PG_FUNCTION_INFO_V1(ltxtq_in);
-Datum		ltxtq_in(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(ltxtq_out);
-Datum		ltxtq_out(PG_FUNCTION_ARGS);
 
 
 /* parser's states */
diff --git a/contrib/pageinspect/btreefuncs.c b/contrib/pageinspect/btreefuncs.c
index e3f3c2818f166a4e2e6cf66101e654b8996817d6..c1e83f301b473e50eb0c83015cf268f47679cbfc 100644
--- a/contrib/pageinspect/btreefuncs.c
+++ b/contrib/pageinspect/btreefuncs.c
@@ -35,10 +35,6 @@
 #include "utils/rel.h"
 
 
-extern Datum bt_metap(PG_FUNCTION_ARGS);
-extern Datum bt_page_items(PG_FUNCTION_ARGS);
-extern Datum bt_page_stats(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(bt_metap);
 PG_FUNCTION_INFO_V1(bt_page_items);
 PG_FUNCTION_INFO_V1(bt_page_stats);
diff --git a/contrib/pageinspect/fsmfuncs.c b/contrib/pageinspect/fsmfuncs.c
index bdae0a58d9e0dc13676f55f7978d8c9beb61b767..8c1960445aef3fed2cbc0dd93094190a8b5dc93e 100644
--- a/contrib/pageinspect/fsmfuncs.c
+++ b/contrib/pageinspect/fsmfuncs.c
@@ -25,8 +25,6 @@
 #include "storage/fsm_internals.h"
 #include "utils/builtins.h"
 
-Datum		fsm_page_contents(PG_FUNCTION_ARGS);
-
 /*
  * Dumps the contents of a FSM page.
  */
diff --git a/contrib/pageinspect/heapfuncs.c b/contrib/pageinspect/heapfuncs.c
index 5e532556e1ef32fc76f8432785c196d4e073797d..dedc8feaeb1cc5ccdd2b654a07914d15d1d96edb 100644
--- a/contrib/pageinspect/heapfuncs.c
+++ b/contrib/pageinspect/heapfuncs.c
@@ -30,8 +30,6 @@
 #include "utils/builtins.h"
 #include "miscadmin.h"
 
-Datum		heap_page_items(PG_FUNCTION_ARGS);
-
 
 /*
  * bits_to_text
diff --git a/contrib/pageinspect/rawpage.c b/contrib/pageinspect/rawpage.c
index f1e0944c0e0beafcffefb0594194a0fff2165db8..66c88b17afa600e3581bc9e03a25594724d5e65c 100644
--- a/contrib/pageinspect/rawpage.c
+++ b/contrib/pageinspect/rawpage.c
@@ -28,10 +28,6 @@
 
 PG_MODULE_MAGIC;
 
-Datum		get_raw_page(PG_FUNCTION_ARGS);
-Datum		get_raw_page_fork(PG_FUNCTION_ARGS);
-Datum		page_header(PG_FUNCTION_ARGS);
-
 static bytea *get_raw_page_internal(text *relname, ForkNumber forknum,
 					  BlockNumber blkno);
 
diff --git a/contrib/pg_buffercache/pg_buffercache_pages.c b/contrib/pg_buffercache/pg_buffercache_pages.c
index 1e2d192f11949bc115593640e99e177cc9123116..f39fe255db63e39a242ac94a921ff02b82b2fec5 100644
--- a/contrib/pg_buffercache/pg_buffercache_pages.c
+++ b/contrib/pg_buffercache/pg_buffercache_pages.c
@@ -19,8 +19,6 @@
 
 PG_MODULE_MAGIC;
 
-Datum		pg_buffercache_pages(PG_FUNCTION_ARGS);
-
 
 /*
  * Record structure holding the to be exposed cache data.
diff --git a/contrib/pg_freespacemap/pg_freespacemap.c b/contrib/pg_freespacemap/pg_freespacemap.c
index f6f7d2e7437e60e2a0b4c49abc3261325a3135dd..7805345add15d78b8205a65f88ca3fe3d089f190 100644
--- a/contrib/pg_freespacemap/pg_freespacemap.c
+++ b/contrib/pg_freespacemap/pg_freespacemap.c
@@ -14,8 +14,6 @@
 
 PG_MODULE_MAGIC;
 
-Datum		pg_freespace(PG_FUNCTION_ARGS);
-
 /*
  * Returns the amount of free space on a given page, according to the
  * free space map.
diff --git a/contrib/pg_prewarm/pg_prewarm.c b/contrib/pg_prewarm/pg_prewarm.c
index f7e112a5e6106030cc41d5db4bf1c2f39aec13a1..d50726d109ba7a7c7031c89060b4780e0a012a95 100644
--- a/contrib/pg_prewarm/pg_prewarm.c
+++ b/contrib/pg_prewarm/pg_prewarm.c
@@ -28,8 +28,6 @@
 
 PG_MODULE_MAGIC;
 
-extern Datum pg_prewarm(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(pg_prewarm);
 
 typedef enum
diff --git a/contrib/pg_stat_statements/pg_stat_statements.c b/contrib/pg_stat_statements/pg_stat_statements.c
index 0bd0d046c7adc3c72746c37b6dc16d41d40fd9d2..2ad3fb588685f8cf84b5c2dad494ea2cc6e16545 100644
--- a/contrib/pg_stat_statements/pg_stat_statements.c
+++ b/contrib/pg_stat_statements/pg_stat_statements.c
@@ -273,10 +273,6 @@ static bool pgss_save;			/* whether to save stats across shutdown */
 void		_PG_init(void);
 void		_PG_fini(void);
 
-Datum		pg_stat_statements_reset(PG_FUNCTION_ARGS);
-Datum		pg_stat_statements_1_2(PG_FUNCTION_ARGS);
-Datum		pg_stat_statements(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(pg_stat_statements_reset);
 PG_FUNCTION_INFO_V1(pg_stat_statements_1_2);
 PG_FUNCTION_INFO_V1(pg_stat_statements);
diff --git a/contrib/pg_trgm/trgm_gin.c b/contrib/pg_trgm/trgm_gin.c
index 1fbbd9ca35ca4498ebecc7c3f30b52494ea55e9a..ac18c7b80f18ffdd72723b62726ff16da8e941d7 100644
--- a/contrib/pg_trgm/trgm_gin.c
+++ b/contrib/pg_trgm/trgm_gin.c
@@ -10,16 +10,9 @@
 
 
 PG_FUNCTION_INFO_V1(gin_extract_trgm);
-Datum		gin_extract_trgm(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(gin_extract_value_trgm);
-Datum		gin_extract_value_trgm(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(gin_extract_query_trgm);
-Datum		gin_extract_query_trgm(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(gin_trgm_consistent);
-Datum		gin_trgm_consistent(PG_FUNCTION_ARGS);
 
 /*
  * This function can only be called if a pre-9.1 version of the GIN operator
diff --git a/contrib/pg_trgm/trgm_gist.c b/contrib/pg_trgm/trgm_gist.c
index c572d0f90f7d76563a08372d72827236a224b54f..ede969f424cd78479c778a2f6f194ea42d1a8fae 100644
--- a/contrib/pg_trgm/trgm_gist.c
+++ b/contrib/pg_trgm/trgm_gist.c
@@ -28,34 +28,15 @@ typedef struct
 
 
 PG_FUNCTION_INFO_V1(gtrgm_in);
-Datum		gtrgm_in(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(gtrgm_out);
-Datum		gtrgm_out(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(gtrgm_compress);
-Datum		gtrgm_compress(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(gtrgm_decompress);
-Datum		gtrgm_decompress(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(gtrgm_consistent);
-Datum		gtrgm_consistent(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(gtrgm_distance);
-Datum		gtrgm_distance(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(gtrgm_union);
-Datum		gtrgm_union(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(gtrgm_same);
-Datum		gtrgm_same(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(gtrgm_penalty);
-Datum		gtrgm_penalty(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(gtrgm_picksplit);
-Datum		gtrgm_picksplit(PG_FUNCTION_ARGS);
 
 /* Number of one-bits in an unsigned byte */
 static const uint8 number_of_ones[256] = {
diff --git a/contrib/pg_trgm/trgm_op.c b/contrib/pg_trgm/trgm_op.c
index dadbeea94d8d5e2ed3f141f5931f8aade52acf26..c385e09edda15e40321f868de04a4ad46086509f 100644
--- a/contrib/pg_trgm/trgm_op.c
+++ b/contrib/pg_trgm/trgm_op.c
@@ -17,22 +17,11 @@ PG_MODULE_MAGIC;
 float4		trgm_limit = 0.3f;
 
 PG_FUNCTION_INFO_V1(set_limit);
-Datum		set_limit(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(show_limit);
-Datum		show_limit(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(show_trgm);
-Datum		show_trgm(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(similarity);
-Datum		similarity(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(similarity_dist);
-Datum		similarity_dist(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(similarity_op);
-Datum		similarity_op(PG_FUNCTION_ARGS);
 
 
 Datum
diff --git a/contrib/pg_upgrade_support/pg_upgrade_support.c b/contrib/pg_upgrade_support/pg_upgrade_support.c
index 77a2c1f63868ae313d23a2eff4c51ffccae3b6aa..edd41d06ae4ec7c47384f45071bc002e130ae08a 100644
--- a/contrib/pg_upgrade_support/pg_upgrade_support.c
+++ b/contrib/pg_upgrade_support/pg_upgrade_support.c
@@ -25,19 +25,6 @@
 PG_MODULE_MAGIC;
 #endif
 
-Datum		set_next_pg_type_oid(PG_FUNCTION_ARGS);
-Datum		set_next_array_pg_type_oid(PG_FUNCTION_ARGS);
-Datum		set_next_toast_pg_type_oid(PG_FUNCTION_ARGS);
-
-Datum		set_next_heap_pg_class_oid(PG_FUNCTION_ARGS);
-Datum		set_next_index_pg_class_oid(PG_FUNCTION_ARGS);
-Datum		set_next_toast_pg_class_oid(PG_FUNCTION_ARGS);
-
-Datum		set_next_pg_enum_oid(PG_FUNCTION_ARGS);
-Datum		set_next_pg_authid_oid(PG_FUNCTION_ARGS);
-
-Datum		create_empty_extension(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(set_next_pg_type_oid);
 PG_FUNCTION_INFO_V1(set_next_array_pg_type_oid);
 PG_FUNCTION_INFO_V1(set_next_toast_pg_type_oid);
diff --git a/contrib/pgcrypto/pgp-pgsql.c b/contrib/pgcrypto/pgp-pgsql.c
index 828f64a84bcb540980dc3570b99b3780e9c61217..fff59de2c8aa2667a648028e45aa83f4822386a7 100644
--- a/contrib/pgcrypto/pgp-pgsql.c
+++ b/contrib/pgcrypto/pgp-pgsql.c
@@ -41,23 +41,6 @@
 /*
  * public functions
  */
-Datum		pgp_sym_encrypt_text(PG_FUNCTION_ARGS);
-Datum		pgp_sym_encrypt_bytea(PG_FUNCTION_ARGS);
-Datum		pgp_sym_decrypt_text(PG_FUNCTION_ARGS);
-Datum		pgp_sym_decrypt_bytea(PG_FUNCTION_ARGS);
-
-Datum		pgp_pub_encrypt_text(PG_FUNCTION_ARGS);
-Datum		pgp_pub_encrypt_bytea(PG_FUNCTION_ARGS);
-Datum		pgp_pub_decrypt_text(PG_FUNCTION_ARGS);
-Datum		pgp_pub_decrypt_bytea(PG_FUNCTION_ARGS);
-
-Datum		pgp_key_id_w(PG_FUNCTION_ARGS);
-
-Datum		pg_armor(PG_FUNCTION_ARGS);
-Datum		pg_dearmor(PG_FUNCTION_ARGS);
-
-/* function headers */
-
 PG_FUNCTION_INFO_V1(pgp_sym_encrypt_bytea);
 PG_FUNCTION_INFO_V1(pgp_sym_encrypt_text);
 PG_FUNCTION_INFO_V1(pgp_sym_decrypt_bytea);
diff --git a/contrib/pgrowlocks/pgrowlocks.c b/contrib/pgrowlocks/pgrowlocks.c
index 636ff0567068882a7b01a9c5393f4973f9e87d04..15d97047525c88b7198cdd8912715b8377afb9a4 100644
--- a/contrib/pgrowlocks/pgrowlocks.c
+++ b/contrib/pgrowlocks/pgrowlocks.c
@@ -43,8 +43,6 @@ PG_MODULE_MAGIC;
 
 PG_FUNCTION_INFO_V1(pgrowlocks);
 
-extern Datum pgrowlocks(PG_FUNCTION_ARGS);
-
 /* ----------
  * pgrowlocks:
  * returns tids of rows being locked
diff --git a/contrib/pgstattuple/pgstatindex.c b/contrib/pgstattuple/pgstatindex.c
index 8939b784db9e720a8b36cbb1ddce087a116646ae..f617d99d4d93161938adccf4b344207b8b051cc2 100644
--- a/contrib/pgstattuple/pgstatindex.c
+++ b/contrib/pgstattuple/pgstatindex.c
@@ -47,12 +47,6 @@
  * Those functions which have text-type input arg will be deprecated
  * in the future release.
  */
-extern Datum pgstatindex(PG_FUNCTION_ARGS);
-extern Datum pgstatindexbyid(PG_FUNCTION_ARGS);
-extern Datum pg_relpages(PG_FUNCTION_ARGS);
-extern Datum pg_relpagesbyid(PG_FUNCTION_ARGS);
-extern Datum pgstatginindex(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(pgstatindex);
 PG_FUNCTION_INFO_V1(pgstatindexbyid);
 PG_FUNCTION_INFO_V1(pg_relpages);
diff --git a/contrib/pgstattuple/pgstattuple.c b/contrib/pgstattuple/pgstattuple.c
index f9ba0a6c21b2ab59646982ac4783b4b7f010255d..16b437babe7a7577cffe17e6322f6504ccf2b19e 100644
--- a/contrib/pgstattuple/pgstattuple.c
+++ b/contrib/pgstattuple/pgstattuple.c
@@ -42,9 +42,6 @@ PG_MODULE_MAGIC;
 PG_FUNCTION_INFO_V1(pgstattuple);
 PG_FUNCTION_INFO_V1(pgstattuplebyid);
 
-extern Datum pgstattuple(PG_FUNCTION_ARGS);
-extern Datum pgstattuplebyid(PG_FUNCTION_ARGS);
-
 /*
  * struct pgstattuple_type
  *
diff --git a/contrib/postgres_fdw/option.c b/contrib/postgres_fdw/option.c
index 8ba2be5ca635256fcc0b2fd34bcc28a95845c9ed..6f98dfcb2342335eb0590e20beb2ab79f0ed66c3 100644
--- a/contrib/postgres_fdw/option.c
+++ b/contrib/postgres_fdw/option.c
@@ -57,8 +57,6 @@ static bool is_libpq_option(const char *keyword);
  *
  * Raise an ERROR if the option or its value is considered invalid.
  */
-extern Datum postgres_fdw_validator(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(postgres_fdw_validator);
 
 Datum
diff --git a/contrib/postgres_fdw/postgres_fdw.c b/contrib/postgres_fdw/postgres_fdw.c
index d7c5fa21195a86e9f24ba0937e63a193cb249933..040e5867bfc9463401bce9164a55da77febfb9d9 100644
--- a/contrib/postgres_fdw/postgres_fdw.c
+++ b/contrib/postgres_fdw/postgres_fdw.c
@@ -228,8 +228,6 @@ typedef struct
 /*
  * SQL functions
  */
-extern Datum postgres_fdw_handler(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(postgres_fdw_handler);
 
 /*
diff --git a/contrib/seg/seg.c b/contrib/seg/seg.c
index 0cf9853060b4e127876cd6da267f93dcd0783009..0807e238f160eb12fcee33f930e0a855f99f30cb 100644
--- a/contrib/seg/seg.c
+++ b/contrib/seg/seg.c
@@ -52,13 +52,6 @@ PG_FUNCTION_INFO_V1(seg_lower);
 PG_FUNCTION_INFO_V1(seg_upper);
 PG_FUNCTION_INFO_V1(seg_center);
 
-Datum		seg_in(PG_FUNCTION_ARGS);
-Datum		seg_out(PG_FUNCTION_ARGS);
-Datum		seg_size(PG_FUNCTION_ARGS);
-Datum		seg_lower(PG_FUNCTION_ARGS);
-Datum		seg_upper(PG_FUNCTION_ARGS);
-Datum		seg_center(PG_FUNCTION_ARGS);
-
 /*
 ** GiST support methods
 */
diff --git a/contrib/spi/autoinc.c b/contrib/spi/autoinc.c
index 54bbc4345c8e756e1bceabb56ee322d3df96a8b3..41eae4fdc459c8fbfc0ddf1e7c78de055f1eb425 100644
--- a/contrib/spi/autoinc.c
+++ b/contrib/spi/autoinc.c
@@ -12,8 +12,6 @@
 
 PG_MODULE_MAGIC;
 
-extern Datum autoinc(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(autoinc);
 
 Datum
diff --git a/contrib/spi/insert_username.c b/contrib/spi/insert_username.c
index 3bc51c7f02095e07348670bc496dfe7c611718d3..875207881a8a8a8b10a52ca64dc66efa862c875c 100644
--- a/contrib/spi/insert_username.c
+++ b/contrib/spi/insert_username.c
@@ -17,8 +17,6 @@
 
 PG_MODULE_MAGIC;
 
-extern Datum insert_username(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(insert_username);
 
 Datum
diff --git a/contrib/spi/moddatetime.c b/contrib/spi/moddatetime.c
index 2ec96540368bc5a587c56aa5562a8ec428ca4fa5..c6d33b73557ff499faa0d475e032fd1f8164afbd 100644
--- a/contrib/spi/moddatetime.c
+++ b/contrib/spi/moddatetime.c
@@ -23,8 +23,6 @@ OH, me, I'm Terry Mackintosh <terry@terrym.com>
 
 PG_MODULE_MAGIC;
 
-extern Datum moddatetime(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(moddatetime);
 
 Datum
diff --git a/contrib/spi/refint.c b/contrib/spi/refint.c
index fbed3003961aa2671a6fe35d0eff9e0376be636a..26022107410abdd795d43f00669fbd937fbe575c 100644
--- a/contrib/spi/refint.c
+++ b/contrib/spi/refint.c
@@ -16,10 +16,6 @@
 
 PG_MODULE_MAGIC;
 
-extern Datum check_primary_key(PG_FUNCTION_ARGS);
-extern Datum check_foreign_key(PG_FUNCTION_ARGS);
-
-
 typedef struct
 {
 	char	   *ident;
diff --git a/contrib/spi/timetravel.c b/contrib/spi/timetravel.c
index fa74daba946022ca08b30e91e5c2637dab91a273..a97eaa148f4a01b27b105f15c3f8e80cecfaca6e 100644
--- a/contrib/spi/timetravel.c
+++ b/contrib/spi/timetravel.c
@@ -22,9 +22,6 @@
 PG_MODULE_MAGIC;
 
 /* AbsoluteTime currabstime(void); */
-Datum		timetravel(PG_FUNCTION_ARGS);
-Datum		set_timetravel(PG_FUNCTION_ARGS);
-Datum		get_timetravel(PG_FUNCTION_ARGS);
 
 typedef struct
 {
diff --git a/contrib/sslinfo/sslinfo.c b/contrib/sslinfo/sslinfo.c
index 90c6b57c699a280b63e0f6e43325834668580521..ac691574b417d036f37592795634b838fefbebd0 100644
--- a/contrib/sslinfo/sslinfo.c
+++ b/contrib/sslinfo/sslinfo.c
@@ -22,16 +22,6 @@
 PG_MODULE_MAGIC;
 
 
-Datum		ssl_is_used(PG_FUNCTION_ARGS);
-Datum		ssl_version(PG_FUNCTION_ARGS);
-Datum		ssl_cipher(PG_FUNCTION_ARGS);
-Datum		ssl_client_cert_present(PG_FUNCTION_ARGS);
-Datum		ssl_client_serial(PG_FUNCTION_ARGS);
-Datum		ssl_client_dn_field(PG_FUNCTION_ARGS);
-Datum		ssl_issuer_field(PG_FUNCTION_ARGS);
-Datum		ssl_client_dn(PG_FUNCTION_ARGS);
-Datum		ssl_issuer_dn(PG_FUNCTION_ARGS);
-
 static Datum X509_NAME_field_to_text(X509_NAME *name, text *fieldName);
 static Datum X509_NAME_to_text(X509_NAME *name);
 static Datum ASN1_STRING_to_text(ASN1_STRING *str);
diff --git a/contrib/tcn/tcn.c b/contrib/tcn/tcn.c
index 701ae824ae2aabfcba99e74b4823fa36e2740c22..b4720969d11ef1fbc0f75276a83e8d92be92e44c 100644
--- a/contrib/tcn/tcn.c
+++ b/contrib/tcn/tcn.c
@@ -27,10 +27,6 @@
 PG_MODULE_MAGIC;
 
 
-/* forward declarations */
-Datum		triggered_change_notification(PG_FUNCTION_ARGS);
-
-
 /*
  * Copy from s (for source) to r (for result), wrapping with q (quote)
  * characters and doubling any quote characters found.
diff --git a/contrib/test_parser/test_parser.c b/contrib/test_parser/test_parser.c
index 932d9248a38c6883e78e179808620f8b78d6400c..c41d1eb201ca69969d165e0453f35b77f0cd4158 100644
--- a/contrib/test_parser/test_parser.c
+++ b/contrib/test_parser/test_parser.c
@@ -38,23 +38,13 @@ typedef struct
 } LexDescr;
 
 /*
- * prototypes
+ * functions
  */
 PG_FUNCTION_INFO_V1(testprs_start);
-Datum		testprs_start(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(testprs_getlexeme);
-Datum		testprs_getlexeme(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(testprs_end);
-Datum		testprs_end(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(testprs_lextype);
-Datum		testprs_lextype(PG_FUNCTION_ARGS);
 
-/*
- * functions
- */
 Datum
 testprs_start(PG_FUNCTION_ARGS)
 {
diff --git a/contrib/test_shm_mq/test.c b/contrib/test_shm_mq/test.c
index 5ff1e9a63f30467f2bef93e2b6625a595e7234fd..1832e1d1dbaaa1d2075d9c78ab9b2beba2ff9d7b 100644
--- a/contrib/test_shm_mq/test.c
+++ b/contrib/test_shm_mq/test.c
@@ -23,8 +23,6 @@ PG_FUNCTION_INFO_V1(test_shm_mq);
 PG_FUNCTION_INFO_V1(test_shm_mq_pipelined);
 
 void		_PG_init(void);
-Datum		test_shm_mq(PG_FUNCTION_ARGS);
-Datum		test_shm_mq_pipelined(PG_FUNCTION_ARGS);
 
 static void verify_message(Size origlen, char *origdata, Size newlen,
 			   char *newdata);
diff --git a/contrib/tsearch2/tsearch2.c b/contrib/tsearch2/tsearch2.c
index e508b43bc43b06529360347fa006c62cc3ff0f94..bd30d875158dbe5b9f283856d77a8d76eb4c39b9 100644
--- a/contrib/tsearch2/tsearch2.c
+++ b/contrib/tsearch2/tsearch2.c
@@ -45,7 +45,7 @@ static Oid	current_parser_oid = InvalidOid;
 					 CStringGetDatum(text_to_cstring(text))))
 
 #define UNSUPPORTED_FUNCTION(name)						\
-	Datum name(PG_FUNCTION_ARGS);						\
+	PG_FUNCTION_INFO_V1(name);							\
 	Datum												\
 	name(PG_FUNCTION_ARGS)								\
 	{													\
@@ -57,30 +57,11 @@ static Oid	current_parser_oid = InvalidOid;
 		/* keep compiler quiet */						\
 		PG_RETURN_NULL();								\
 	}													\
-	PG_FUNCTION_INFO_V1(name)
+	extern int no_such_variable
 
 static Oid	GetCurrentDict(void);
 static Oid	GetCurrentParser(void);
 
-Datum		tsa_lexize_byname(PG_FUNCTION_ARGS);
-Datum		tsa_lexize_bycurrent(PG_FUNCTION_ARGS);
-Datum		tsa_set_curdict(PG_FUNCTION_ARGS);
-Datum		tsa_set_curdict_byname(PG_FUNCTION_ARGS);
-Datum		tsa_token_type_current(PG_FUNCTION_ARGS);
-Datum		tsa_set_curprs(PG_FUNCTION_ARGS);
-Datum		tsa_set_curprs_byname(PG_FUNCTION_ARGS);
-Datum		tsa_parse_current(PG_FUNCTION_ARGS);
-Datum		tsa_set_curcfg(PG_FUNCTION_ARGS);
-Datum		tsa_set_curcfg_byname(PG_FUNCTION_ARGS);
-Datum		tsa_to_tsvector_name(PG_FUNCTION_ARGS);
-Datum		tsa_to_tsquery_name(PG_FUNCTION_ARGS);
-Datum		tsa_plainto_tsquery_name(PG_FUNCTION_ARGS);
-Datum		tsa_headline_byname(PG_FUNCTION_ARGS);
-Datum		tsa_ts_stat(PG_FUNCTION_ARGS);
-Datum		tsa_tsearch2(PG_FUNCTION_ARGS);
-Datum		tsa_rewrite_accum(PG_FUNCTION_ARGS);
-Datum		tsa_rewrite_finish(PG_FUNCTION_ARGS);
-
 PG_FUNCTION_INFO_V1(tsa_lexize_byname);
 PG_FUNCTION_INFO_V1(tsa_lexize_bycurrent);
 PG_FUNCTION_INFO_V1(tsa_set_curdict);
diff --git a/contrib/unaccent/unaccent.c b/contrib/unaccent/unaccent.c
index 10cc1e36f1037f5340bd5e2fe75aea54446e6ff9..a337df61af4f5dd45a9c39dc9543b07602cae75d 100644
--- a/contrib/unaccent/unaccent.c
+++ b/contrib/unaccent/unaccent.c
@@ -216,7 +216,6 @@ findReplaceTo(TrieChar *node, unsigned char *src, int srclen)
 }
 
 PG_FUNCTION_INFO_V1(unaccent_init);
-Datum		unaccent_init(PG_FUNCTION_ARGS);
 Datum
 unaccent_init(PG_FUNCTION_ARGS)
 {
@@ -258,7 +257,6 @@ unaccent_init(PG_FUNCTION_ARGS)
 }
 
 PG_FUNCTION_INFO_V1(unaccent_lexize);
-Datum		unaccent_lexize(PG_FUNCTION_ARGS);
 Datum
 unaccent_lexize(PG_FUNCTION_ARGS)
 {
@@ -313,7 +311,6 @@ unaccent_lexize(PG_FUNCTION_ARGS)
  * Function-like wrapper for dictionary
  */
 PG_FUNCTION_INFO_V1(unaccent_dict);
-Datum		unaccent_dict(PG_FUNCTION_ARGS);
 Datum
 unaccent_dict(PG_FUNCTION_ARGS)
 {
diff --git a/contrib/uuid-ossp/uuid-ossp.c b/contrib/uuid-ossp/uuid-ossp.c
index 8e80c24f1bdca2a6d5772ece57547f2c109ad778..8f99084df3487d48f86291aab45cf10625955639 100644
--- a/contrib/uuid-ossp/uuid-ossp.c
+++ b/contrib/uuid-ossp/uuid-ossp.c
@@ -39,19 +39,6 @@
 PG_MODULE_MAGIC;
 
 
-Datum		uuid_nil(PG_FUNCTION_ARGS);
-Datum		uuid_ns_dns(PG_FUNCTION_ARGS);
-Datum		uuid_ns_url(PG_FUNCTION_ARGS);
-Datum		uuid_ns_oid(PG_FUNCTION_ARGS);
-Datum		uuid_ns_x500(PG_FUNCTION_ARGS);
-
-Datum		uuid_generate_v1(PG_FUNCTION_ARGS);
-Datum		uuid_generate_v1mc(PG_FUNCTION_ARGS);
-Datum		uuid_generate_v3(PG_FUNCTION_ARGS);
-Datum		uuid_generate_v4(PG_FUNCTION_ARGS);
-Datum		uuid_generate_v5(PG_FUNCTION_ARGS);
-
-
 PG_FUNCTION_INFO_V1(uuid_nil);
 PG_FUNCTION_INFO_V1(uuid_ns_dns);
 PG_FUNCTION_INFO_V1(uuid_ns_url);
diff --git a/contrib/worker_spi/worker_spi.c b/contrib/worker_spi/worker_spi.c
index 560be21814edc93d77f042294204e6155c2a0ea6..a01385354fe2b0567c3c7d147d8c9a40d5faf3fd 100644
--- a/contrib/worker_spi/worker_spi.c
+++ b/contrib/worker_spi/worker_spi.c
@@ -47,7 +47,6 @@ PG_FUNCTION_INFO_V1(worker_spi_launch);
 
 void		_PG_init(void);
 void		worker_spi_main(Datum);
-Datum		worker_spi_launch(PG_FUNCTION_ARGS);
 
 /* flags set by signal handlers */
 static volatile sig_atomic_t got_sighup = false;
diff --git a/contrib/xml2/xpath.c b/contrib/xml2/xpath.c
index 41cb98d13952b6d138e640baa476373425dac012..156ed2f49357209483f7ff8276652d9d1ab53bff 100644
--- a/contrib/xml2/xpath.c
+++ b/contrib/xml2/xpath.c
@@ -26,17 +26,6 @@
 
 PG_MODULE_MAGIC;
 
-/* externally accessible functions */
-
-Datum		xml_is_well_formed(PG_FUNCTION_ARGS);
-Datum		xml_encode_special_chars(PG_FUNCTION_ARGS);
-Datum		xpath_nodeset(PG_FUNCTION_ARGS);
-Datum		xpath_string(PG_FUNCTION_ARGS);
-Datum		xpath_number(PG_FUNCTION_ARGS);
-Datum		xpath_bool(PG_FUNCTION_ARGS);
-Datum		xpath_list(PG_FUNCTION_ARGS);
-Datum		xpath_table(PG_FUNCTION_ARGS);
-
 /* exported for use by xslt_proc.c */
 
 PgXmlErrorContext *pgxml_parser_init(PgXmlStrictness strictness);
diff --git a/contrib/xml2/xslt_proc.c b/contrib/xml2/xslt_proc.c
index 2f24b39bcc0043f0bdcba98023327359dc584a0a..9f1378733228ff98bf58c3daaf9b3435f9c1df32 100644
--- a/contrib/xml2/xslt_proc.c
+++ b/contrib/xml2/xslt_proc.c
@@ -32,10 +32,6 @@
 #endif   /* USE_LIBXSLT */
 
 
-/* externally accessible functions */
-
-Datum		xslt_process(PG_FUNCTION_ARGS);
-
 #ifdef USE_LIBXSLT
 
 /* declarations to come from xpath.c */
diff --git a/src/include/fmgr.h b/src/include/fmgr.h
index aed81cdc26b540555db83fa8b444c363038985eb..494c768826b8b51582ad497fa74a3e88f4f670fe 100644
--- a/src/include/fmgr.h
+++ b/src/include/fmgr.h
@@ -348,6 +348,7 @@ typedef const Pg_finfo_record *(*PGFInfoFunction) (void);
  *	doesn't hurt to add PGDLLIMPORT in case they don't.
  */
 #define PG_FUNCTION_INFO_V1(funcname) \
+Datum funcname(PG_FUNCTION_ARGS); \
 extern PGDLLEXPORT const Pg_finfo_record * CppConcat(pg_finfo_,funcname)(void); \
 const Pg_finfo_record * \
 CppConcat(pg_finfo_,funcname) (void) \
diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c
index 5fff63558f1272e452f12a5a8c8b6c2722bbd8f7..ffdf634f55b525c7e64cbcc70f5839c780902735 100644
--- a/src/pl/plperl/plperl.c
+++ b/src/pl/plperl/plperl.c
@@ -240,12 +240,6 @@ static plperl_call_data *current_call_data = NULL;
 /**********************************************************************
  * Forward declarations
  **********************************************************************/
-Datum		plperl_call_handler(PG_FUNCTION_ARGS);
-Datum		plperl_inline_handler(PG_FUNCTION_ARGS);
-Datum		plperl_validator(PG_FUNCTION_ARGS);
-Datum		plperlu_call_handler(PG_FUNCTION_ARGS);
-Datum		plperlu_inline_handler(PG_FUNCTION_ARGS);
-Datum		plperlu_validator(PG_FUNCTION_ARGS);
 void		_PG_init(void);
 
 static PerlInterpreter *plperl_init_interp(void);
diff --git a/src/pl/plpgsql/src/plpgsql.h b/src/pl/plpgsql/src/plpgsql.h
index 41fc9407a22c3144bc9435ed55b6245353279867..b4d1498e4367a813e9aea17e3cff6d9cc94dadd1 100644
--- a/src/pl/plpgsql/src/plpgsql.h
+++ b/src/pl/plpgsql/src/plpgsql.h
@@ -950,9 +950,6 @@ extern void plpgsql_HashTableInit(void);
  * ----------
  */
 extern void _PG_init(void);
-extern Datum plpgsql_call_handler(PG_FUNCTION_ARGS);
-extern Datum plpgsql_inline_handler(PG_FUNCTION_ARGS);
-extern Datum plpgsql_validator(PG_FUNCTION_ARGS);
 
 /* ----------
  * Functions in pl_exec.c
diff --git a/src/pl/plpython/plpy_main.c b/src/pl/plpython/plpy_main.c
index 4438721589e3c865cd223e8689b7cf0bc0d6b945..5f03efa4fb61c4d6c58455c731d0ef4da210e8b0 100644
--- a/src/pl/plpython/plpy_main.c
+++ b/src/pl/plpython/plpy_main.c
@@ -40,16 +40,6 @@
 #endif
 
 extern void _PG_init(void);
-extern Datum plpython_validator(PG_FUNCTION_ARGS);
-extern Datum plpython_call_handler(PG_FUNCTION_ARGS);
-extern Datum plpython_inline_handler(PG_FUNCTION_ARGS);
-
-#if PY_MAJOR_VERSION < 3
-/* Define aliases plpython2_call_handler etc */
-extern Datum plpython2_validator(PG_FUNCTION_ARGS);
-extern Datum plpython2_call_handler(PG_FUNCTION_ARGS);
-extern Datum plpython2_inline_handler(PG_FUNCTION_ARGS);
-#endif
 
 PG_MODULE_MAGIC;
 
@@ -58,6 +48,7 @@ PG_FUNCTION_INFO_V1(plpython_call_handler);
 PG_FUNCTION_INFO_V1(plpython_inline_handler);
 
 #if PY_MAJOR_VERSION < 3
+/* Define aliases plpython2_call_handler etc */
 PG_FUNCTION_INFO_V1(plpython2_validator);
 PG_FUNCTION_INFO_V1(plpython2_call_handler);
 PG_FUNCTION_INFO_V1(plpython2_inline_handler);
diff --git a/src/pl/tcl/pltcl.c b/src/pl/tcl/pltcl.c
index 2d862a6b059560bb347ad6dac20629890413377f..8c18d5ea20555fc8f3542a8f8aa1cd89cbb094bf 100644
--- a/src/pl/tcl/pltcl.c
+++ b/src/pl/tcl/pltcl.c
@@ -192,8 +192,6 @@ static pltcl_proc_desc *pltcl_current_prodesc = NULL;
 /**********************************************************************
  * Forward declarations
  **********************************************************************/
-Datum		pltcl_call_handler(PG_FUNCTION_ARGS);
-Datum		pltclu_call_handler(PG_FUNCTION_ARGS);
 void		_PG_init(void);
 
 static void pltcl_init_interp(pltcl_interp_desc *interp_desc, bool pltrusted);
diff --git a/src/test/regress/regress.c b/src/test/regress/regress.c
index 4dbe314557e28b6790bd36afa983848858ba162f..c25bf6e09d1dbf637d804e55423647c1c0cc4dd7 100644
--- a/src/test/regress/regress.c
+++ b/src/test/regress/regress.c
@@ -28,18 +28,10 @@
 #define RDELIM			')'
 #define DELIM			','
 
-extern Datum regress_dist_ptpath(PG_FUNCTION_ARGS);
-extern Datum regress_path_dist(PG_FUNCTION_ARGS);
 extern PATH *poly2path(POLYGON *poly);
-extern Datum interpt_pp(PG_FUNCTION_ARGS);
 extern void regress_lseg_construct(LSEG *lseg, Point *pt1, Point *pt2);
-extern Datum overpaid(PG_FUNCTION_ARGS);
-extern Datum boxarea(PG_FUNCTION_ARGS);
 extern char *reverse_name(char *string);
 extern int	oldstyle_length(int n, text *t);
-extern Datum int44in(PG_FUNCTION_ARGS);
-extern Datum int44out(PG_FUNCTION_ARGS);
-extern Datum make_tuple_indirect(PG_FUNCTION_ARGS);
 
 #ifdef PG_MODULE_MAGIC
 PG_MODULE_MAGIC;
@@ -236,7 +228,6 @@ typedef struct
 
 WIDGET	   *widget_in(char *str);
 char	   *widget_out(WIDGET * widget);
-extern Datum pt_in_widget(PG_FUNCTION_ARGS);
 
 #define NARGS	3
 
@@ -341,7 +332,6 @@ static int	fd17b_level = 0;
 static int	fd17a_level = 0;
 static bool fd17b_recursion = true;
 static bool fd17a_recursion = true;
-extern Datum funny_dup17(PG_FUNCTION_ARGS);
 
 PG_FUNCTION_INFO_V1(funny_dup17);
 
@@ -453,9 +443,6 @@ funny_dup17(PG_FUNCTION_ARGS)
 	return PointerGetDatum(tuple);
 }
 
-extern Datum ttdummy(PG_FUNCTION_ARGS);
-extern Datum set_ttdummy(PG_FUNCTION_ARGS);
-
 #define TTDUMMY_INFINITY	999999
 
 static SPIPlanPtr splan = NULL;