On 04/12/2007, Glen W. Mabey <Glen.Mabey@xxxxxxxx> 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