Stephen Woodbridge <wood...@swoodbridge.com> writes: > Thank you for your reply. The frustrating thing about this is the same > source works fine in Linux. So here is the pseudo code of my source > removing non pgsql stuff and not expected to be runnable:
You can't hold a SPI context open across multiple calls of an SRF. Even if it somehow failed to malfunction in isolation, this would certainly not work in a query where some other called function was also using SPI. Possibly the reason the code accidentally fails to malfunction on Linux is you're not using an --enable-cassert build there? That would wipe freed memory and thus help to reveal errors of this sort consistently, whereas otherwise the failures would be context-dependent. [ later ] > Someone might want to look into this. Even if there were good reason to think this was a system bug and not yours, there's little anyone else can do when you've not provided a complete, concrete test case. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers