Must a C state transition function use palloc on the returned value?

Поиск
Список
Период
Сортировка
От Dirk Lutzebaeck
Тема Must a C state transition function use palloc on the returned value?
Дата
Msg-id 14859.55737.695894.517231@ampato.core.aeccom.com
обсуждение исходный текст
Ответы Re: Must a C state transition function use palloc on the returned value?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Peter Mount
Дата:
Сообщение: RE: [INTERFACES] JDBC 'Unterminated quoted string'
Следующее
От: Christof Petig
Дата:
Сообщение: Re: Re: [INTERFACES] USE OF CURSORS IN ECPG