Re: BUG #8516: Calling VOLATILE from STABLE function

From: Dimitri Fontaine <dimitri(at)2ndQuadrant(dot)fr>
To: 'Bruce Momjian' <bruce(at)momjian(dot)us>
Cc: Dwayne Towell <dwayne(at)docketnavigator(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #8516: Calling VOLATILE from STABLE function
Date: 2013-10-11 07:21:21
Message-ID: m27gdk6zny.fsf@2ndQuadrant.fr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

'Bruce Momjian' <bruce(at)momjian(dot)us> 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 tho, because you can use EXECUTE against programatically
generated SQL.

You could even generate a CREATE FUNCTION command from within a PL
function and EXECUTE it then call the created function… and I think I've
seen people do that in the past.

Still some kind of limited in scope static analysis for the cases where
it's possible to do so would be great. With pg_depend tracking so that
you know you're doing something wrong at DROP FUNCTION time.

Regards,
--
Dimitri Fontaine
http://2ndQuadrant.fr PostgreSQL : Expertise, Formation et Support

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Terje Elde 2013-10-11 08:02:36 Re: BUG #8516: Calling VOLATILE from STABLE function
Previous Message Michael Paquier 2013-10-11 06:14:31 Re: BUG #8514: cache lookup failed for relation 421062806