palloc with user's functions

From: "Ricardo J(dot)C(dot)Coelho" <pulsar(at)truenet-ce(dot)com(dot)br>
To: "pgsql-general(at)postgreSQL(dot)org" <pgsql-general(at)postgreSQL(dot)org>
Subject: palloc with user's functions
Date: 1999-02-08 22:38:30
Message-ID: 01BE53A3.92694620.pulsar@truenet-ce.com.br
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joel Parker Henderson 1999-02-09 01:57:03 How do I unsubscribe?
Previous Message Ricardo J.C.Coelho 1999-02-08 22:21:11 A mistake generates strange result