palloc with user's functions

Поиск
Список
Период
Сортировка
От Ricardo J.C.Coelho
Тема palloc with user's functions
Дата
Msg-id 01BE53A3.92694620.pulsar@truenet-ce.com.br
обсуждение исходный текст
Ответы Postgres C interface
Список pgsql-general
Hi,

I create a C function: create function FUNC (text) returns text as '/path/func.so' language 'C';

As described in manual, I allocate space to text return: ret=(text *) palloc (datasize+VARHDRSZ);

The function works fine with small tables, but some problem occurs during server pfree with big tables.

When I use: select FUNC(INT4_FIELD::text) from TBL;
Server goes down with this message: PortalHeapMemoryFree: 0x8.... not in alloc set.

Thanks in advance for your help.

Ricardo Coelho.

В списке pgsql-general по дате отправления:

Предыдущее
От: "Ricardo J.C.Coelho"
Дата:
Сообщение: A mistake generates strange result
Следующее
От: Joel Parker Henderson
Дата:
Сообщение: How do I unsubscribe?