This is small patch fixes a spi example (PG_MODULE_MAGIC is required as
authorBruce Momjian <bruce@momjian.us>
Fri, 14 Sep 2007 04:18:27 +0000 (04:18 +0000)
committerBruce Momjian <bruce@momjian.us>
Fri, 14 Sep 2007 04:18:27 +0000 (04:18 +0000)
of PostgreSQL 8.2) and provides a link to compiling and linking section.

Euler Taveira de Oliveira

doc/src/sgml/spi.sgml

index 3827703fb7c2edfd002e774dc49ac5f1fc3a8840..3ee4b06e71978e039a6dc069b059571a54261aa7 100644 (file)
@@ -3326,6 +3326,10 @@ INSERT INTO a SELECT * FROM a;
 <programlisting>
 #include "executor/spi.h"
 
+#ifdef PG_MODULE_MAGIC
+PG_MODULE_MAGIC;
+#endif
+
 int execq(text *sql, int cnt);
 
 int
@@ -3381,7 +3385,7 @@ execq(text *sql, int cnt)
 
   <para>
    This is how you declare the function after having compiled it into
-   a shared library:
+   a shared library (details are in <xref linkend="dfunc">.):
 
 <programlisting>
 CREATE FUNCTION execq(text, integer) RETURNS integer