Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 91e7926

Browse files
committed
Remove no-longer-required function declarations.
Remove a bunch of "extern Datum foo(PG_FUNCTION_ARGS);" declarations that are no longer needed now that PG_FUNCTION_INFO_V1(foo) provides that. Some of these were evidently missed in commit e7128e8, but others were cargo-culted in in code added since then. Possibly that can be blamed in part on the fact that we'd not fixed relevant documentation examples, which I've now done.
1 parent 807b9e0 commit 91e7926

File tree

37 files changed

+3
-170
lines changed

37 files changed

+3
-170
lines changed

contrib/hstore_plperl/hstore_plperl.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ PG_MODULE_MAGIC;
99

1010

1111
PG_FUNCTION_INFO_V1(hstore_to_plperl);
12-
Datum hstore_to_plperl(PG_FUNCTION_ARGS);
1312

1413
Datum
1514
hstore_to_plperl(PG_FUNCTION_ARGS)
@@ -39,7 +38,6 @@ hstore_to_plperl(PG_FUNCTION_ARGS)
3938

4039

4140
PG_FUNCTION_INFO_V1(plperl_to_hstore);
42-
Datum plperl_to_hstore(PG_FUNCTION_ARGS);
4341

4442
Datum
4543
plperl_to_hstore(PG_FUNCTION_ARGS)

contrib/hstore_plpython/hstore_plpython.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ PG_MODULE_MAGIC;
88

99

1010
PG_FUNCTION_INFO_V1(hstore_to_plpython);
11-
Datum hstore_to_plpython(PG_FUNCTION_ARGS);
1211

1312
Datum
1413
hstore_to_plpython(PG_FUNCTION_ARGS)
@@ -45,7 +44,6 @@ hstore_to_plpython(PG_FUNCTION_ARGS)
4544

4645

4746
PG_FUNCTION_INFO_V1(plpython_to_hstore);
48-
Datum plpython_to_hstore(PG_FUNCTION_ARGS);
4947

5048
Datum
5149
plpython_to_hstore(PG_FUNCTION_ARGS)

contrib/ltree_plpython/ltree_plpython.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ PG_MODULE_MAGIC;
77

88

99
PG_FUNCTION_INFO_V1(ltree_to_plpython);
10-
Datum ltree_to_plpython(PG_FUNCTION_ARGS);
1110

1211
Datum
1312
ltree_to_plpython(PG_FUNCTION_ARGS)

contrib/pg_audit/pg_audit.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,6 @@ PG_MODULE_MAGIC;
4242

4343
void _PG_init(void);
4444

45-
/* Prototypes for functions used with event triggers */
46-
Datum pg_audit_ddl_command_end(PG_FUNCTION_ARGS);
47-
Datum pg_audit_sql_drop(PG_FUNCTION_ARGS);
48-
4945
PG_FUNCTION_INFO_V1(pg_audit_ddl_command_end);
5046
PG_FUNCTION_INFO_V1(pg_audit_sql_drop);
5147

doc/src/sgml/event-trigger.sgml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -998,8 +998,6 @@ typedef struct EventTriggerData
998998

999999
PG_MODULE_MAGIC;
10001000

1001-
Datum noddl(PG_FUNCTION_ARGS);
1002-
10031001
PG_FUNCTION_INFO_V1(noddl);
10041002

10051003
Datum

doc/src/sgml/gist.sgml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,6 @@ LANGUAGE C STRICT;
327327
And the matching code in the C module could then follow this skeleton:
328328

329329
<programlisting>
330-
Datum my_consistent(PG_FUNCTION_ARGS);
331330
PG_FUNCTION_INFO_V1(my_consistent);
332331

333332
Datum
@@ -390,7 +389,6 @@ LANGUAGE C STRICT;
390389
And the matching code in the C module could then follow this skeleton:
391390

392391
<programlisting>
393-
Datum my_union(PG_FUNCTION_ARGS);
394392
PG_FUNCTION_INFO_V1(my_union);
395393

396394
Datum
@@ -464,7 +462,6 @@ LANGUAGE C STRICT;
464462
And the matching code in the C module could then follow this skeleton:
465463

466464
<programlisting>
467-
Datum my_compress(PG_FUNCTION_ARGS);
468465
PG_FUNCTION_INFO_V1(my_compress);
469466

470467
Datum
@@ -525,7 +522,6 @@ LANGUAGE C STRICT;
525522
And the matching code in the C module could then follow this skeleton:
526523

527524
<programlisting>
528-
Datum my_decompress(PG_FUNCTION_ARGS);
529525
PG_FUNCTION_INFO_V1(my_decompress);
530526

531527
Datum
@@ -565,7 +561,6 @@ LANGUAGE C STRICT; -- in some cases penalty functions need not be strict
565561
And the matching code in the C module could then follow this skeleton:
566562

567563
<programlisting>
568-
Datum my_penalty(PG_FUNCTION_ARGS);
569564
PG_FUNCTION_INFO_V1(my_penalty);
570565

571566
Datum
@@ -614,7 +609,6 @@ LANGUAGE C STRICT;
614609
And the matching code in the C module could then follow this skeleton:
615610

616611
<programlisting>
617-
Datum my_picksplit(PG_FUNCTION_ARGS);
618612
PG_FUNCTION_INFO_V1(my_picksplit);
619613

620614
Datum
@@ -721,7 +715,6 @@ LANGUAGE C STRICT;
721715
And the matching code in the C module could then follow this skeleton:
722716

723717
<programlisting>
724-
Datum my_same(PG_FUNCTION_ARGS);
725718
PG_FUNCTION_INFO_V1(my_same);
726719

727720
Datum
@@ -772,7 +765,6 @@ LANGUAGE C STRICT;
772765
And the matching code in the C module could then follow this skeleton:
773766

774767
<programlisting>
775-
Datum my_distance(PG_FUNCTION_ARGS);
776768
PG_FUNCTION_INFO_V1(my_distance);
777769

778770
Datum
@@ -859,7 +851,6 @@ LANGUAGE C STRICT;
859851
The matching code in the C module could then follow this skeleton:
860852

861853
<programlisting>
862-
Datum my_fetch(PG_FUNCTION_ARGS);
863854
PG_FUNCTION_INFO_V1(my_fetch);
864855

865856
Datum

doc/src/sgml/trigger.sgml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -709,11 +709,7 @@ CREATE TABLE ttest (
709709
#include "commands/trigger.h" /* ... triggers ... */
710710
#include "utils/rel.h" /* ... and relations */
711711

712-
#ifdef PG_MODULE_MAGIC
713712
PG_MODULE_MAGIC;
714-
#endif
715-
716-
extern Datum trigf(PG_FUNCTION_ARGS);
717713

718714
PG_FUNCTION_INFO_V1(trigf);
719715

src/backend/snowball/dict_snowball.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,8 @@
6161
PG_MODULE_MAGIC;
6262

6363
PG_FUNCTION_INFO_V1(dsnowball_init);
64-
Datum dsnowball_init(PG_FUNCTION_ARGS);
6564

6665
PG_FUNCTION_INFO_V1(dsnowball_lexize);
67-
Datum dsnowball_lexize(PG_FUNCTION_ARGS);
6866

6967
/* List of supported modules */
7068
typedef struct stemmer_module

src/backend/utils/mb/conversion_procs/ascii_and_mic/ascii_and_mic.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ PG_MODULE_MAGIC;
2020
PG_FUNCTION_INFO_V1(ascii_to_mic);
2121
PG_FUNCTION_INFO_V1(mic_to_ascii);
2222

23-
extern Datum ascii_to_mic(PG_FUNCTION_ARGS);
24-
extern Datum mic_to_ascii(PG_FUNCTION_ARGS);
25-
2623
/* ----------
2724
* conv_proc(
2825
* INTEGER, -- source encoding id

src/backend/utils/mb/conversion_procs/cyrillic_and_mic/cyrillic_and_mic.c

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -40,27 +40,6 @@ PG_FUNCTION_INFO_V1(win1251_to_iso);
4040
PG_FUNCTION_INFO_V1(iso_to_win866);
4141
PG_FUNCTION_INFO_V1(win866_to_iso);
4242

43-
extern Datum koi8r_to_mic(PG_FUNCTION_ARGS);
44-
extern Datum mic_to_koi8r(PG_FUNCTION_ARGS);
45-
extern Datum iso_to_mic(PG_FUNCTION_ARGS);
46-
extern Datum mic_to_iso(PG_FUNCTION_ARGS);
47-
extern Datum win1251_to_mic(PG_FUNCTION_ARGS);
48-
extern Datum mic_to_win1251(PG_FUNCTION_ARGS);
49-
extern Datum win866_to_mic(PG_FUNCTION_ARGS);
50-
extern Datum mic_to_win866(PG_FUNCTION_ARGS);
51-
extern Datum koi8r_to_win1251(PG_FUNCTION_ARGS);
52-
extern Datum win1251_to_koi8r(PG_FUNCTION_ARGS);
53-
extern Datum koi8r_to_win866(PG_FUNCTION_ARGS);
54-
extern Datum win866_to_koi8r(PG_FUNCTION_ARGS);
55-
extern Datum win866_to_win1251(PG_FUNCTION_ARGS);
56-
extern Datum win1251_to_win866(PG_FUNCTION_ARGS);
57-
extern Datum iso_to_koi8r(PG_FUNCTION_ARGS);
58-
extern Datum koi8r_to_iso(PG_FUNCTION_ARGS);
59-
extern Datum iso_to_win1251(PG_FUNCTION_ARGS);
60-
extern Datum win1251_to_iso(PG_FUNCTION_ARGS);
61-
extern Datum iso_to_win866(PG_FUNCTION_ARGS);
62-
extern Datum win866_to_iso(PG_FUNCTION_ARGS);
63-
6443
/* ----------
6544
* conv_proc(
6645
* INTEGER, -- source encoding id

0 commit comments

Comments
 (0)