I work on query cache support in SPI and for better inspiration I see
how use SPI good programmer in RI triggers :-)
And I a little surprised, in one part of RI Jan use SPI_prepare/saveplan
before SPI_connect(). I don't know if this part is used, but if I see to SPI
I must say "it can't works --- it must return error SPI_ERROR_UNCONNECTED
from _SPI_begin_call()".
It is ri_triggers.c: row 253
Am I right? Karel