Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-interfaces by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group