Re: Unstable C Function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Ian Campbell <ianrc72(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Unstable C Function
Date: 2016-09-22 11:25:53
Message-ID: 13768.1474543553@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ian Campbell <ianrc72(at)gmail(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sylvain Marechal 2016-09-22 12:23:20 Monitor pg_xlog size via SQL with postgres 9.4
Previous Message FarjadFarid(ChkNet) 2016-09-22 10:18:56 Re: json select question