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

From: Thomas Hallgren <thhal(at)mailblocks(dot)com>
To: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: UPDATE is not allowed in a non-volatile function
Date: 2004-11-04 10:10:51
Message-ID: thhal-0n5hlAj8g30AaStIiuUwJy9lpbk2sKC@mailblocks.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert,

>I think the guidelines are fairly clear on what types of functions should be
>declared with which types. But the key is that these are guidelines, not hard
>and fast rules, since there may be times when you need to ignore them.
>
>
In 7.4 they where indeed guidelines. In 8.x the semantics of the
function attribute are meant to be enforced. I quote Tom from this
thread: "You don't have a lot of room to complain because 8.0 started to
enforce that.".

>"users" shouldn't care. the function developer should determine the details
>and "users" shouldn't have to think about it.
>
>
The "user" in this context, is the user of the function attribute, i.e.
the function developer. Sorry if I was unclear.

>Well, personally I prefered the way thing worked in 7.4, but I'm willing to
>live with the 8.x method. If you forcibly prevent the work around though,
>you better provide a work around, and if that mean a fourth function type I
>could live with that; it's certainly better than marking these types of
>functions volitile, which is a non-starter in my application.
>
>
Right, I also preferred 7.4 since I consider it less ambiguous then the
current solution. But a much better solution is just around the corner
and it would be unfortunate if some fairly rare scenarios are used as an
argument to prevent it. Especially since those scenarios can be easily
catered for by introducing a fourth type.

Regards,
Thomas Hallgren

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message gevik 2004-11-04 10:26:41 Contribute to the development of PostgreSQL
Previous Message Peter Eisentraut 2004-11-04 10:06:45 Re: [HACKERS] Possible make_oidjoins_check Security Issue