Re: UPDATE is not allowed in a non-volatile function

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Gaetano Mendola <mendola(at)bigfoot(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: UPDATE is not allowed in a non-volatile function
Date: 2004-11-01 20:19:52
Message-ID: 24622.1099340392@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Gaetano Mendola <mendola(at)bigfoot(dot)com> writes:
> The fact that a non-volatile function can not perform
> update is a good improvement but on the other side will
> limit too much if I know what I'm doing.

I've got zero sympathy for this argument. It's been documented right
along that functions with side-effects must be marked volatile. You
don't have a lot of room to complain because 8.0 started to enforce that.

In practice you can circumvent the restriction by splitting the
function in two (ie, there is no check that a nonvolatile function
doesn't call any volatile functions). So if you insist on sticking
with an unsafe application design, you can do it with relatively
localized changes.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-11-01 20:24:56 Re: [pgsql-hackers-win32] Win32 lost signals open item
Previous Message Magnus Hagander 2004-11-01 20:04:26 Re: [pgsql-hackers-win32] Win32 lost signals open item