Re: Error in trigger after upgrading to 8.0.1?

From: Sven Willenberger <sven(at)dmv(dot)com>
To: Bjørn T Johansen <btj(at)havleik(dot)no>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Error in trigger after upgrading to 8.0.1?
Date: 2005-02-05 22:32:56
Message-ID: 42054998.8060806@dmv.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-02-05 22:42:36 Re: Error in trigger after upgrading to 8.0.1?
Previous Message Andrey V. Semyonov 2005-02-05 22:28:53 Re: Error in trigger after upgrading to 8.0.1?