I found the solution: SPI_gettype() does the job fine.
I was led to that by rummaging through the slony sourcecode to see how they handle the triggers in C.
--Paul Nicholson--