Re: [BUGS] BUG #8516: Calling VOLATILE from STABLE function

2013-10-11 Thread Dwayne Towell
> According to the documentation, f() should be marked VOLATILE also, since > calling f() produces side effects. PostgreSQL does not give a warning (or > better yet, an error); I think it should. I think the answer is that function authors are required to prevent functions they mark as STABLE from

Re: [BUGS] BUG #8516: Calling VOLATILE from STABLE function

2013-10-11 Thread Tom Lane
Terje Elde writes: > Would it be possible (and make sense) to solve this in a completely different > way, not walking the function tree or doing static analysis, but simply > setting and checking a bit during execution? While it's possible that we could do something like that, I think it's fair

Re: [BUGS] BUG #8516: Calling VOLATILE from STABLE function

2013-10-11 Thread Terje Elde
On Oct 11, 2013, at 9:21 AM, Dimitri Fontaine wrote: > Inter function dependencies is a hard topic indeed. I still would like > to see some kind of progress being made someday. The general case is > turing complete tho, because you can use EXECUTE against programatically > generated SQL. > > You

Re: [BUGS] BUG #8516: Calling VOLATILE from STABLE function

2013-10-11 Thread Dimitri Fontaine
'Bruce Momjian' writes: > Well, we can't walk the function tree to know all called functions, and > those they call, so we don't even try. Inter function dependencies is a hard topic indeed. I still would like to see some kind of progress being made someday. The general case is turing complete th

Re: [BUGS] BUG #8516: Calling VOLATILE from STABLE function

2013-10-10 Thread 'Bruce Momjian'
On Thu, Oct 10, 2013 at 04:10:35PM -0700, Dwayne Towell wrote: > > According to the documentation, f() should be marked VOLATILE also, since > > calling f() produces side effects. PostgreSQL does not give a warning (or > > better yet, an error); I think it should. > > I think the answer is that fu

Re: [BUGS] BUG #8516: Calling VOLATILE from STABLE function

2013-10-10 Thread Bruce Momjian
On Wed, Oct 9, 2013 at 08:58:46PM +, dwa...@docketnavigator.com wrote: > The following bug has been logged on the website: > > Bug reference: 8516 > Logged by: Dwayne Towell > Email address: dwa...@docketnavigator.com > PostgreSQL version: 9.2.4 > Operating system: CentOS

[BUGS] BUG #8516: Calling VOLATILE from STABLE function

2013-10-10 Thread dwayne
The following bug has been logged on the website: Bug reference: 8516 Logged by: Dwayne Towell Email address: dwa...@docketnavigator.com PostgreSQL version: 9.2.4 Operating system: CentOS Description: Why doesn't PostgreSQL give a warning when calling a volatile funct