magic block in doc functions
magic block in doc functions
От:
Euler Taveira de Oliveira <euler@timbira.com>
Дата:
Hi, I noticed that some example functions don't contain the magic block and that leads to error while loading those examples in 8.2 or later. Attached is a patch that adds it. I also add some missing header file. Don't have a strong opinion about backpatching it or not. -- Euler Taveira de Oliveira http://www.timbira.com/ Index: doc/src/sgml/plhandler.sgml =================================================================== RCS file: /a/pgsql/dev/anoncvs/pgsql/doc/src/sgml/plhandler.sgml,v retrieving revision 1.8 diff -c -r1.8 plhandler.sgml *** doc/src/sgml/plhandler.sgml 8 Oct 2009 04:41:07 -0000 1.8 --- doc/src/sgml/plhandler.sgml 17 Nov 2009 02:44:26 -0000 *************** *** 106,111 **** --- 106,115 ---- #include "catalog/pg_proc.h" #include "catalog/pg_type.h" + #ifdef PG_MODULE_MAGIC + PG_MODULE_MAGIC; + #endif + PG_FUNCTION_INFO_V1(plsample_call_handler); Datum Index: doc/src/sgml/trigger.sgml =================================================================== RCS file: /a/pgsql/dev/anoncvs/pgsql/doc/src/sgml/trigger.sgml,v retrieving revision 1.59 diff -c -r1.59 trigger.sgml *** doc/src/sgml/trigger.sgml 14 Oct 2009 22:14:21 -0000 1.59 --- doc/src/sgml/trigger.sgml 17 Nov 2009 02:50:27 -0000 *************** *** 576,581 **** --- 576,585 ---- #include "executor/spi.h" /* this is what you need to work with SPI */ #include "commands/trigger.h" /* ... and triggers */ + #ifdef PG_MODULE_MAGIC + PG_MODULE_MAGIC; + #endif + extern Datum trigf(PG_FUNCTION_ARGS); PG_FUNCTION_INFO_V1(trigf); Index: doc/src/sgml/xfunc.sgml =================================================================== RCS file: /a/pgsql/dev/anoncvs/pgsql/doc/src/sgml/xfunc.sgml,v retrieving revision 1.140 diff -c -r1.140 xfunc.sgml *** doc/src/sgml/xfunc.sgml 8 Oct 2009 02:39:16 -0000 1.140 --- doc/src/sgml/xfunc.sgml 18 Nov 2009 03:13:07 -0000 *************** *** 1925,1930 **** --- 1925,1935 ----
Re: magic block in doc functions
От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
On ons, 2009-11-18 at 01:39 -0200, Euler Taveira de Oliveira wrote: > I noticed that some example functions don't contain the magic block and that > leads to error while loading those examples in 8.2 or later. > > Attached is a patch that adds it. I also add some missing header file. Don't > have a strong opinion about backpatching it or not. Committed to 8.5