On Sat, 2010-04-24 at 12:59 -0400, Tom Lane wrote:
> Well, you did it without much thought at all.
To the consequences, definitely.
> I think this episode is a
> perfect demonstration of why we ask for concrete use-cases for proposed
> hooks. If you'd actually tried to write something that used the hook,
> you'd surely have noticed that it wasn't being passed the information
> that it would need to do anything useful, and you'd probably have
> recognized the problem that there's no good way for a single hook
> function to provide an extensible collection of function-specific
> knowledge.
To the value, no. The limitations of the hook approach were clear, but
they do at least allow overriding values on a session by session basis,
allowing you to write a program to estimate the result and then set the
function costs accordingly. It's not clever or the best way, but it was
the same situation as the other hooks currently provide and I imagined
it would be accepted without question, wrongly.
--
Simon Riggs www.2ndQuadrant.com