View Single Post

   
  #2 (permalink)  
Old 04-09-2008, 11:13 PM
Pavel Stehule
 
Posts: n/a
Default Re: difficulty extracting variable-sized field on triggered row

On 04/12/2007, Glen W. Mabey <Glen.Mabey@swri.org> wrote:
> Hello,
>
> I have been trying to write a trigger in C operating on each row
> that would (as a first step) copy a field of type TEXT into a text*
> variable.
>
> I think that I've got the SPI_connect, SPI_fnumber, and SPI_getbinval
> calls correct, but this gives me a Datum.
>
> How do I convert a Datum to a text*?
>


use macro DatumGetPointer(datum)

Pavel

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply With Quote