Re: Question about simple function folding optimization

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>, <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Question about simple function folding optimization
Date: 2003-04-11 13:23:31
Message-ID: Pine.LNX.4.44.0304110345140.2212-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane writes:

> But I wonder whether any better answer is possible. I don't want to
> give up on the inlining optimization --- anyone see another fix?

If a functional index applies to the function, generate one plan with the
function inlined and one with the function call left in, and then plan
away as usual. While that could blow up the number of plan choices to
consider (which would have to be controlled in some way), this would give
the best end results because the planner could consider the choice knowing
what the function results are used for.

--
Peter Eisentraut peter_e(at)gmx(dot)net

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message bkline 2003-04-11 13:57:51 Upgrade to RedHat 9.0 broke PostgreSQL
Previous Message Alice Lottini 2003-04-11 10:57:09 Integration with Access Method interface