Re: BUG #8516: Calling VOLATILE from STABLE function - Mailing list pgsql-bugs

From Dimitri Fontaine
Subject Re: BUG #8516: Calling VOLATILE from STABLE function
Date
Msg-id m27gdk6zny.fsf@2ndQuadrant.fr
Whole thread Raw
In response to Re: BUG #8516: Calling VOLATILE from STABLE function  ('Bruce Momjian' <bruce@momjian.us>)
Responses Re: BUG #8516: Calling VOLATILE from STABLE function  (Terje Elde <terje@elde.net>)
List pgsql-bugs
'Bruce Momjian' <bruce@momjian.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=E2=80=A6 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,
--=20
Dimitri Fontaine
http://2ndQuadrant.fr     PostgreSQL : Expertise, Formation et Support

pgsql-bugs by date:

Previous
From: Michael Paquier
Date:
Subject: Re: BUG #8514: cache lookup failed for relation 421062806
Next
From: Terje Elde
Date:
Subject: Re: BUG #8516: Calling VOLATILE from STABLE function