Add PG_MODULE_MAGIC and some missing include files to examples
authorPeter Eisentraut
Mon, 23 Nov 2009 21:41:20 +0000 (21:41 +0000)
committerPeter Eisentraut
Mon, 23 Nov 2009 21:41:20 +0000 (21:41 +0000)
Author: Euler Taveira de Oliveira 

doc/src/sgml/plhandler.sgml
doc/src/sgml/trigger.sgml
doc/src/sgml/xfunc.sgml

index 0d8ec93b8636366016086fc69fa735ab99168ccb..eb3c58243ee2861adb7d92430a38f9348ecdb27e 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
  
    Writing A Procedural Language Handler
 #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 2c2ec89b02895092626fcc0a4f9c6e26b9c30008..49571ca7c5cd0c9ac4b5e318157ef1c0e615f387 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
  
   Triggers
@@ -596,6 +596,10 @@ CREATE TABLE ttest (
 #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 1c20f15226a3cb377ece7591ce6a66b9733539f4..7a5fa4a0d9099da37f6d79eafc24ce10282b0c5c 100644 (file)
@@ -1,4 +1,4 @@
-
+
 
  
   User-Defined Functions
@@ -1925,6 +1925,11 @@ memcpy(destination->data, buffer, 40);
 
 #include "postgres.h"
 #include 
+#include "utils/geo_decls.h"
+
+#ifdef PG_MODULE_MAGIC
+PG_MODULE_MAGIC;
+#endif
 
 /* by value */
 
@@ -2099,6 +2104,11 @@ PG_FUNCTION_INFO_V1(funcname);
 #include "postgres.h"
 #include 
 #include "fmgr.h"
+#include "utils/geo_decls.h"
+
+#ifdef PG_MODULE_MAGIC
+PG_MODULE_MAGIC;
+#endif
 
 /* by value */
 
@@ -2638,6 +2648,10 @@ SELECT name, c_overpaid(emp, 1500) AS overpaid
 #include "postgres.h"
 #include "executor/executor.h"  /* for GetAttributeByName() */
 
+#ifdef PG_MODULE_MAGIC
+PG_MODULE_MAGIC;
+#endif
+
 bool
 c_overpaid(HeapTupleHeader t, /* the current row of emp */
            int32 limit)
@@ -2659,6 +2673,10 @@ c_overpaid(HeapTupleHeader t, /* the current row of emp */
 #include "postgres.h"
 #include "executor/executor.h"  /* for GetAttributeByName() */
 
+#ifdef PG_MODULE_MAGIC
+PG_MODULE_MAGIC;
+#endif
+
 PG_FUNCTION_INFO_V1(c_overpaid);
 
 Datum