Re: Crash on SRF execution - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Crash on SRF execution
Date
Msg-id 25884.1426434584@sss.pgh.pa.us
Whole thread Raw
In response to Crash on SRF execution  (Itai <itaid@outlook.com>)
Responses Re: Crash on SRF execution  (Itai Dor-On <itaid@outlook.com>)
List pgsql-hackers
Itai <itaid@outlook.com> writes:
> I'm attempting to program a simple SRF function but it constantly crashes (details and code below).
> Any idea why?

Looks like you're pallocing some stuff in the calling context (ie, a
short-lived context) during the first execution and expecting it to
still be there in later executions.  You'd need to allocate those
data structures in the multi_call_memory_ctx instead.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Itai
Date:
Subject: Crash on SRF execution
Next
From: Andres Freund
Date:
Subject: Re: Crash on SRF execution