Willem Buitendyk <willem@pcfish.ca> writes:
> ERROR: SPI_connect failed: SPI_ERROR_CONNECT
> CONTEXT: PL/pgSQL function "pop_tag_day_over" line 17 at FOR over
> SELECT rows
Hm, what PG version is this? And could we have a complete test case
not just the function? (I don't feel like trying to reverse-engineer
your tables and views...)
regards, tom lane