Re: Error in trigger after upgrading to 8.0.1? - Mailing list pgsql-general

From Bjørn T Johansen
Subject Re: Error in trigger after upgrading to 8.0.1?
Date
Msg-id 4205556F.3080102@havleik.no
Whole thread Raw
In response to Re: Error in trigger after upgrading to 8.0.1?  (Sven Willenberger <sven@dmv.com>)
List pgsql-general
> Bjørn T Johansen wrote:
>
>> I have just upgraded to 8.0.1 from 7.4.6 and now my triggers doesn't
>> work. When I insert a row in a table that has an insert trigger, I get
>> the following error msg:
>>
>> ERROR:  INSERT is not allowed in a non-volatile function
>>
>>
>> What does this mean?
>>
>>
>> Regards,
>>
>> BTJ
>>
>
> It would appear as though the function in question was not created as a
> VOLATILE function (i.e. it was created with the STABLE or IMMUTABLE
> attribute).
>
> Can you try and:
> CREATE OR REPLACE FUNCTION function_name ...... AS $$
> <your function def>
> $$ LANGUAGE plpgsql VOLATILE;
>
> Sven Willenberger
>

That did the trick, thx...

BTJ

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Error in trigger after upgrading to 8.0.1?
Next
From: Jonel Rienton
Date:
Subject: Re: Help with sorting (ie. ORDER BY expression)