palloc with user's functions

Started by Ricardo J.C.Coelhoabout 27 years ago2 messagesgeneral
Jump to latest
#1Ricardo J.C.Coelho
pulsar@truenet-ce.com.br

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.

#2Dinesh Patil
dpatel@Synopsys.COM
In reply to: Ricardo J.C.Coelho (#1)
Postgres C interface

Hi,

Can you please give me any information about how C programming can be used
for accessing, creating database of Postgres.

I am not getting clear idea of how Postmaster process has to be started and
how to initialize different parameters of Postgres.

So please help me for this..

thanks for your help in advance..

Dinesh Patil