On Wed, Aug 11, 2010 at 11:01 AM, Brian Ceccarelli <bceccare...@net32.com> wrote: > My complaint remains. That inlined function f_return_ver_id_4() is a > STABLE function, inlined or not. Postgres now calls it multiple times during > the transaction, even though the arguments to f_return_ver_id_4() have not > changed. > > STABLE no longer means STABLE. This behavior is killing my performance. > I am getting 500% to 30000% increase in latency.
We've never guaranteed that, and almost certainly never will. Marking a function STABLE means that the planner is *allowed to assume* that the results won't change for a given set of arguments, not that it is *required to prevent* it from being called multiple times with the same set of arguments. You can certainly prevent the function from being inlined, though (perhaps, by writing it in PL/pgsql). -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise Postgres Company -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs