Must a C state transition function use palloc on the returned value?
Dirk Lutzebäck <lutzeb@aeccom.com>
From: Dirk Lutzebaeck <lutzeb@aeccom.com>
To: pgsql-hackers@postgresql.org
Date: 2000-11-10T11:19:21Z
Lists: 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