Re: Unstable C Function - Mailing list pgsql-general

From Tom Lane
Subject Re: Unstable C Function
Date
Msg-id 13768.1474543553@sss.pgh.pa.us
Whole thread Raw
In response to Re: Unstable C Function  (Ian Campbell <ianrc72@gmail.com>)
Responses Re: Unstable C Function  (Ian Campbell <ianrc72@gmail.com>)
List pgsql-general
Ian Campbell <ianrc72@gmail.com> writes:
> Thanks for personally replying, Tom. I appreciate it.
> You are correct. In the interim, I found the following change solved the
> issue:

> SPI_finish(); // move to here
> SRF_RETURN_DONE(funcctx);

That might work under light usage, but the problem with it is you're
blocking any other function in the same query from using SPI, since
you're leaving your own connection active when returning.  Sooner
or later that's gonna be a problem.

            regards, tom lane


pgsql-general by date:

Previous
From: "FarjadFarid\(ChkNet\)"
Date:
Subject: Re: json select question
Next
From: Sylvain Marechal
Date:
Subject: Monitor pg_xlog size via SQL with postgres 9.4