Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id AADA89FA2C5 for ; Fri, 24 Aug 2007 00:25:48 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 45795-03 for ; Fri, 24 Aug 2007 00:25:44 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from vps.newx.com.br (vps.newx.com.br [72.232.208.191]) by postgresql.org (Postfix) with ESMTP id 2CD279F9C2F for ; Fri, 24 Aug 2007 00:25:44 -0300 (ADT) Received: from [201.21.233.91] (helo=[10.1.2.10]) by vps.newx.com.br with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.66) (envelope-from ) id 1IOPcg-0004A6-1n for pgsql-docs@postgresql.org; Thu, 23 Aug 2007 23:14:11 -0400 Message-ID: <46CE4FC1.9080003@timbira.com> Date: Fri, 24 Aug 2007 00:25:53 -0300 From: Euler Taveira de Oliveira User-Agent: Thunderbird 1.5.0.10 (X11/20070301) MIME-Version: 1.0 To: pgsql-docs@postgresql.org Subject: small spi patch X-Enigmail-Version: 0.94.3.0 Content-Type: multipart/mixed; boundary="------------050407000907030405040101" X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.newx.com.br X-AntiAbuse: Original Domain - postgresql.org X-AntiAbuse: Originator/Caller UID/GID - [0 0] / [47 12] X-AntiAbuse: Sender Address Domain - timbira.com X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200708/22 X-Sequence-Number: 4369 This is a multi-part message in MIME format. --------------050407000907030405040101 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi, This is small patch fixes a spi example (PG_MODULE_MAGIC is required as of PostgreSQL 8.2) and provides a link to compiling and linking section. -- Euler Taveira de Oliveira http://www.timbira.com/ --------------050407000907030405040101 Content-Type: text/x-patch; name="spi.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="spi.diff" *** spi.sgml.orig 2007-08-23 23:57:09.000000000 -0300 --- spi.sgml 2007-08-24 00:06:37.000000000 -0300 *************** *** 3325,3330 **** --- 3325,3334 ---- #include "executor/spi.h" + #ifdef PG_MODULE_MAGIC + PG_MODULE_MAGIC; + #endif + int execq(text *sql, int cnt); int *************** *** 3380,3386 **** This is how you declare the function after having compiled it into ! a shared library: CREATE FUNCTION execq(text, integer) RETURNS integer --- 3384,3390 ---- This is how you declare the function after having compiled it into ! a shared library (details are in .): CREATE FUNCTION execq(text, integer) RETURNS integer --------------050407000907030405040101--