C function and enum types parameters

From: Edoardo Panfili <edoardo(at)aspix(dot)it>
To: pgsql-general(at)postgresql(dot)org
Subject: C function and enum types parameters
Date: 2008-03-21 21:42:25
Message-ID: 47E42BC1.6010604@aspix.it
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I use a C function in my database from 2002, all goes well also with
postgresql 8.3 but with 8.3.1 it no longer works, the problem is with
this line:

text *hibrid = (PG_ARGISNULL( 0) ||
VARSIZE(PG_GETARG_TEXT_P( 0))==VARHDRSZ ?NULL:PG_GETARG_TEXT_P(0));

the argument number 0 is an enum defined by

CREATE TYPE hibridationLevel AS ENUM('none','genus','specie');

the error is "ERROR: invalid memory alloc request size 2298488997"

I can't figure by now how to correct my error, can anyone help me?

thank you
edoardo
--
Jabber: edoardopa(at)talk(dot)google(dot)com
tel: 075 9142766

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-03-21 21:44:47 Re: Transaction wraparound problem with database postgres
Previous Message Tom Lane 2008-03-21 21:33:59 Re: --enable-thread-safety bug