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

2004-11-07 Thread Gaetano Mendola
Tom Lane wrote: Gaetano Mendola [EMAIL PROTECTED] 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

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

2004-11-04 Thread Thomas Hallgren
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

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

2004-11-04 Thread Gaetano Mendola
Tom Lane wrote: Thomas Hallgren [EMAIL PROTECTED] writes: The Rationale for my opinion is that since there is a need to accomplish what Gaetano needs, there should be declarative power to express it and thus, prevent unsafe designs. We need a way to declare a function stable with no _intrusive_

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

2004-11-03 Thread Tom Lane
Thomas Hallgren [EMAIL PROTECTED] writes: The Rationale for my opinion is that since there is a need to accomplish what Gaetano needs, there should be declarative power to express it and thus, prevent unsafe designs. We need a way to declare a function stable with no _intrusive_ side

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

2004-11-03 Thread Thomas Hallgren
Tom, What you think is non-intrusive may not be so at the database's level. I know. But thats not my point. Look at this this way: I'd like to declare a function STABLE. And I'd like to trust that declaration 100%. So a stable function must *never* call a function that is VOLATILE. Not

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

2004-11-03 Thread Robert Treat
On Wednesday 03 November 2004 18:06, Thomas Hallgren wrote: Tom, What you think is non-intrusive may not be so at the database's level. I know. But thats not my point. Look at this this way: I'd like to declare a function STABLE. And I'd like to trust that declaration 100%. So a stable

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

2004-11-02 Thread Thomas Hallgren
Gaetano, I do not consider my design as unsafe, this is for example how a cache works: expose a read without side effect but updating internal statistics. After all the read will not alter the data that it expose but other data that the user even don't know the existence. However I think that that

Re: [HACKERS] [pgsql-hackers] UPDATE is not allowed in a non-volatile function

2004-11-02 Thread Josh Berkus
Gaetano, I do not consider my design as unsafe, this is for example how a cache works: expose a read without side effect but updating internal statistics. After all the read will not alter the data that it expose but other data that the user even don't know the existence. At issue is the

Re: [HACKERS] [pgsql-hackers] UPDATE is not allowed in a non-volatile function

2004-11-02 Thread Gaetano Mendola
Josh Berkus wrote: Gaetano, I do not consider my design as unsafe, this is for example how a cache works: expose a read without side effect but updating internal statistics. After all the read will not alter the data that it expose but other data that the user even don't know the existence. At

[HACKERS] UPDATE is not allowed in a non-volatile function

2004-11-01 Thread Gaetano Mendola
Hi all, I missed the discussion on hacker about this, and I'd like to give my HO. 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 did a sort of Lookup framework and this is extensively used in

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

2004-11-01 Thread Tom Lane
Gaetano Mendola [EMAIL PROTECTED] 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

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

2004-11-01 Thread Gaetano Mendola
Tom Lane wrote: Gaetano Mendola [EMAIL PROTECTED] 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