X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 903B6D1B2BD for ; Wed, 30 Jun 2004 00:04:18 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 76304-09 for ; Wed, 30 Jun 2004 03:03:56 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id B4C41D1B285 for ; Wed, 30 Jun 2004 00:03:55 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i5U33hoL002957; Tue, 29 Jun 2004 23:03:43 -0400 (EDT) To: "Alastair Bell Turner" Cc: pgsql-interfaces@postgresql.org Subject: Re: SPI problem In-reply-to: <12482.209.212.106.190.1088002081.squirrel@mail.tangent.co.za> References: <12482.209.212.106.190.1088002081.squirrel@mail.tangent.co.za> Comments: In-reply-to "Alastair Bell" Turner "" message dated "Wed, 23 Jun 2004 16:48:01 +0200" Date: Tue, 29 Jun 2004 23:03:42 -0400 Message-ID: <2956.1088564622@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/71 X-Sequence-Number: 4999 "Alastair Bell" Turner "" writes: > I'm trying to build a c trigger with the Server Programming Interface and > not having a lot of joy. I think what you need to return from a trigger is PointerGetDatum() of a HeapTuple. TupleGetDatum is a different animal that is *not* used for trigger results, for mostly-historical reasons. There are several working examples in the contrib/ modules. regards, tom lane