Re: hidden errors calling a volatile function inside a stable function

From: "Merlin Moncure" <mmoncure(at)gmail(dot)com>
To: "Sabin Coanda" <sabin(dot)coanda(at)deuromedia(dot)ro>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: hidden errors calling a volatile function inside a stable function
Date: 2008-11-20 12:18:10
Message-ID: b42b73150811200418h72050c4fq5e57c1d122ff2b46@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Nov 20, 2008 at 6:21 AM, Sabin Coanda
<sabin(dot)coanda(at)deuromedia(dot)ro> wrote:
> Hi,
>
> I have "PostgreSQL 8.2.4 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC)
> 3.4.2 (mingw-special)" on Windows OS , but I experienced the same problem on
> "PostgreSQL 8.3.5, compiled by Visual C++ build 1400" too.
>
> I attach the demo database here, to be available to test according with the
> following scenario.
>
> I found in a STABLE function, for instance "TEST_0"(), it is not allowed to
> use INSERT statement. Trying this will give me the error:
> ERROR: INSERT is not allowed in a non-volatile function

Why did you lie when your declared your function stable? :-)

merlin

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Merlin Moncure 2008-11-20 12:20:26 Re: Prepared statement already exists
Previous Message Ivan Sergio Borgonovo 2008-11-20 12:16:17 Re: transaction_read_only effects on performance, actual meaning (was: How to reduce impact of a query)