Re: invalid memory alloc after insert with c trigger function

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Dudás József <dj1999(at)freemail(dot)hu>
Cc: Gregory Stark <stark(at)enterprisedb(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: invalid memory alloc after insert with c trigger function
Date: 2007-06-01 13:21:42
Message-ID: 20070601132142.GC27968@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Are you compiling with warnings? Because this should have blown up on
you:

On Fri, Jun 01, 2007 at 02:03:26PM +0200, Dudás József wrote:
> PG_FUNCTION_INFO_V1(_selectFunctionB);
> Datum
> _selectFunctionB( char *sql )

If you've declared your function V1 then it doesn't get passed
parameters like that. The compiler should have flagged this.

Also, can you show how you defined the function in SQL, does it match?

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-06-01 13:34:02 Re: invalid memory alloc after insert with c trigger function
Previous Message Frank Wittig 2007-06-01 13:21:31 Re: warm standby server stops doing checkpoints afterawhile