Re: SPI problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Alastair Bell Turner" <bell(at)tangent(dot)co(dot)za>
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: SPI problem
Date: 2004-06-30 03:03:42
Message-ID: 2956.1088564622@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

"Alastair Bell" Turner "" <bell(at)tangent(dot)co(dot)za> 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

In response to

  • SPI problem at 2004-06-23 14:48:01 from Alastair Bell Turner

Browse pgsql-interfaces by date

  From Date Subject
Next Message Carlos Ojea Castro 2004-06-30 07:13:33 Re: : query using kylix (delphi)
Previous Message Greg Markham 2004-06-30 00:04:57 Embedded SQL timestamp Question (ECPG)