Re: UPDATE is not allowed in a non-volatile function - Mailing list pgsql-hackers

From Thomas Hallgren
Subject Re: UPDATE is not allowed in a non-volatile function
Date
Msg-id thhal-0n5hlAj8g30AaStIiuUwJy9lpbk2sKC@mailblocks.com
Whole thread Raw
In response to Re: UPDATE is not allowed in a non-volatile function  (Robert Treat <xzilla@users.sourceforge.net>)
List 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




pgsql-hackers by date:

Previous
From: Tatsuo Ishii
Date:
Subject: DBT-3 v1.5 Q19 (Re: Proposed Query Planner TODO items)
Next
From: gevik@xs4all.nl
Date:
Subject: Contribute to the development of PostgreSQL