From: Daniel Gustafsson =0A= Date: Wed, 30 Aug 2017 19:25:07 +0200=0A= Subject: [PATCH] Remove to pre-8.2 coding convention for PG_MODULE_MAGIC=0A= =0A= PG_MODULE_MAGIC has been around since 8.2, with 8.1 long since in=0A= EOL, so remove the mention of #ifdef guards for compiling against=0A= pre-8.2 sources from the documentation.=0A= =0A= Also remove the last remaining #ifdef guards in the code.=0A= ---=0A= contrib/citext/citext.c | 2 --=0A= doc/src/sgml/plhandler.sgml | 2 --=0A= doc/src/sgml/spi.sgml | 2 --=0A= doc/src/sgml/xfunc.sgml | 14 +-------------=0A= src/test/regress/regress.c | 2 --=0A= 5 files changed, 1 insertion(+), 21 deletions(-)=0A= =0A= diff --git a/contrib/citext/citext.c b/contrib/citext/citext.c=0A= index 04f604b15f..0ba47828ba 100644=0A= --- a/contrib/citext/citext.c=0A= +++ b/contrib/citext/citext.c=0A= @@ -9,9 +9,7 @@=0A= #include "utils/formatting.h"=0A= #include "utils/varlena.h"=0A= =20=0A= -#ifdef PG_MODULE_MAGIC=0A= PG_MODULE_MAGIC;=0A= -#endif=0A= =20=0A= /*=0A= * =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= diff --git a/doc/src/sgml/plhandler.sgml b/doc/src/sgml/plhandler.sgml=0A= index 57a2a05ed2..2573e67743 100644=0A= --- a/doc/src/sgml/plhandler.sgml=0A= +++ b/doc/src/sgml/plhandler.sgml=0A= @@ -108,9 +108,7 @@=0A= #include "catalog/pg_proc.h"=0A= #include "catalog/pg_type.h"=0A= =20=0A= -#ifdef PG_MODULE_MAGIC=0A= PG_MODULE_MAGIC;=0A= -#endif=0A= =20=0A= PG_FUNCTION_INFO_V1(plsample_call_handler);=0A= =20=0A= diff --git a/doc/src/sgml/spi.sgml b/doc/src/sgml/spi.sgml=0A= index 86be87c0fd..d04b5a2125 100644=0A= --- a/doc/src/sgml/spi.sgml=0A= +++ b/doc/src/sgml/spi.sgml=0A= @@ -4352,9 +4352,7 @@ INSERT INTO a SELECT * FROM a;=0A= #include "executor/spi.h"=0A= #include "utils/builtins.h"=0A= =20=0A= -#ifdef PG_MODULE_MAGIC=0A= PG_MODULE_MAGIC;=0A= -#endif=0A= =20=0A= int64 execq(text *sql, int cnt);=0A= =20=0A= diff --git a/doc/src/sgml/xfunc.sgml b/doc/src/sgml/xfunc.sgml=0A= index cd6dd840ba..197e20022e 100644=0A= --- a/doc/src/sgml/xfunc.sgml=0A= +++ b/doc/src/sgml/xfunc.sgml=0A= @@ -1757,22 +1757,14 @@ CREATE FUNCTION square_root(double precision) RETUR= NS double precision=0A= file contains a magic block with the appropriate contents.= =0A= This allows the server to detect obvious incompatibilities, such as co= de=0A= compiled for a different major version of=0A= - PostgreSQL. A magic block is required as o= f=0A= - PostgreSQL 8.2. To include a magic block,= =0A= + PostgreSQL. To include a magic block,=0A= write this in one (and only one) of the module source files, after hav= ing=0A= included the header fmgr.h:=0A= =20=0A= =0A= -#ifdef PG_MODULE_MAGIC=0A= PG_MODULE_MAGIC;=0A= -#endif=0A= =0A= =20=0A= - The #ifdef test can be omitted if the code doesn't=0A= - need to compile against pre-8.2 PostgreSQL= =0A= - releases.=0A= - =0A= -=0A= =0A= After it is used for the first time, a dynamically loaded object=0A= file is retained in memory. Future calls in the same session to=0A= @@ -2214,9 +2206,7 @@ PG_FUNCTION_INFO_V1(funcname);=0A= #include "fmgr.h"=0A= #include "utils/geo_decls.h"=0A= =20=0A= -#ifdef PG_MODULE_MAGIC=0A= PG_MODULE_MAGIC;=0A= -#endif=0A= =20=0A= /* by value */=0A= =20=0A= @@ -2554,9 +2544,7 @@ SELECT name, c_overpaid(emp, 1500) AS overpaid=0A= #include "postgres.h"=0A= #include "executor/executor.h" /* for GetAttributeByName() */=0A= =20=0A= -#ifdef PG_MODULE_MAGIC=0A= PG_MODULE_MAGIC;=0A= -#endif=0A= =20=0A= PG_FUNCTION_INFO_V1(c_overpaid);=0A= =20=0A= diff --git a/src/test/regress/regress.c b/src/test/regress/regress.c=0A= index 3d33b36e66..734947cc98 100644=0A= --- a/src/test/regress/regress.c=0A= +++ b/src/test/regress/regress.c=0A= @@ -46,9 +46,7 @@=0A= extern PATH *poly2path(POLYGON *poly);=0A= extern void regress_lseg_construct(LSEG *lseg, Point *pt1, Point *pt2);=0A= =20=0A= -#ifdef PG_MODULE_MAGIC=0A= PG_MODULE_MAGIC;=0A= -#endif=0A= =20=0A= =20=0A= /*=0A= --=20=0A= 2.14.1.145.gb3622a4ee=0A= =0A= --Apple-Mail=_3D930969-56F6-4B0B-A88D-71C83EA6533A Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-docs --Apple-Mail=_3D930969-56F6-4B0B-A88D-71C83EA6533A--