Markus Wagner <wagner@imsd.uni-mainz.de> writes:
> this would mean that all result tables are kept in memory until the trigger
> function exits?
Until you do SPI_freetuptable or SPI_finish, yes, an SPI result sticks
around.
> What do you mean with "copy it and associated globals into locals", just the
> pointers or the data itself?
Just the pointer. You may or may not need to hang onto SPI_processed,
SPI_lastoid, or SPI_result; a copy of SPI_tuptable might be enough for
your purposes.
If the docs don't seem clear enough to you, feel free to submit a doc
patch ...
regards, tom lane