Must a C state transition function use palloc on the returned value? - Mailing list pgsql-hackers

From Dirk Lutzebaeck
Subject Must a C state transition function use palloc on the returned value?
Date
Msg-id 14859.55737.695894.517231@ampato.core.aeccom.com
Whole thread Raw
Responses Re: Must a C state transition function use palloc on the returned value?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hi,

I'm defining a new aggregate using a C transition function. It is of
type TEXT, so the C function gets pointers (*text) to the internal-state1 and
next-data-item parameters. 

Question is if the returning value of type *text must be palloc'ed or
can be just taken from the input parameters. In the latter case I get
error messages like 

NOTICE:  PortalHeapMemoryFree: 0x0x40b22ce8 not in alloc set!

Dirk


pgsql-hackers by date:

Previous
From: Peter Mount
Date:
Subject: RE: [INTERFACES] JDBC 'Unterminated quoted string'
Next
From: Christof Petig
Date:
Subject: Re: Re: [INTERFACES] USE OF CURSORS IN ECPG