Re: Error in trigger after upgrading to 8.0.1?

From: "Andrey V(dot) Semyonov" <wilfre(at)mail(dot)ru>
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:28:53
Message-ID: 420548A5.2090303@mail.ru
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?

That is highly documented in the PGSQL 8.0 documentation. That exactly
means that a function that is not VOLATILE (such as STABLE, IMMUTABLE)
can't make any changes in tables (INSERT, UPDATE, DELETE). For such
operations, it MUST be VOLATILE. So, re-create (or REPLACE) your
functions, that do make any changes in tables with VOLATILE option set up.

Best regards,
Andrey V. Semyonov

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Sven Willenberger 2005-02-05 22:32:56 Re: Error in trigger after upgrading to 8.0.1?
Previous Message Reuben D. Budiardja 2005-02-05 22:25:06 Help with sorting (ie. ORDER BY expression)