SPI_Free() causes backend to close. - Mailing list pgsql-hackers

From Rod Taylor
Subject SPI_Free() causes backend to close.
Date
Msg-id 017301c0985c$911f3a90$2205010a@jester
Whole thread Raw
List pgsql-hackers
Perhaps someone can explain what's wrong with this.  Excuse the mess,
it was cut out of a much larger function but reliably creates the
error on my Postgres 7.1 beta 4 machine.

Compile C function, restart postgres (for the heck of it), create a
new db (I used 'stuff), import sql.  The insert it runs at the end
fails, and:

pqReadData() -- backend closed the channel unexpectedly.....

Quite confused, if I remove the SPI_Finish() it works fine, but
complains every time an SPI_Connect is issued after the first run of
the function.

As you can see, the closure is SPI_Finish as the notice before
appears, and the notice after doesn't.

--
Rod Taylor

There are always four sides to every story: your side, their side, the
truth, and what really happened.

pgsql-hackers by date:

Previous
From: Thomas Lockhart
Date:
Subject: Re: extract vs date_part
Next
From: Stephan Szabo
Date:
Subject: Re: wish list for 7.2 (ALTER TABLE)