Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Tom Lane wrote:
>> What really needs to happen next is to think about which bits of
>> selfuncs.c should be exposed --- what's generally useful, and do we
>> think that it has an API clean/stable enough to expose?
> Well, the ltree routine just needs struct VariableStatData and
> macro ReleaseVariableStats(), and we need to change one function from
> static to global. That and some #includes, and it works. Do we want to
> be more formal about it?
If we're going to expose VariableStatData then I think the minimum
reasonable set of supporting functions would be examine_variable(),
get_restriction_variable(), get_join_variable(). Matteo's patch only
uses the second one but that's because he's only implementing one type
of estimator (no joinsel function for instance).
I'd be inclined to create a new header file, too, instead of cluttering
builtins.h with this stuff. utils/selfuncs.h probably.
I'm willing to work on this, but it doesn't look like you reverted the
prior patch yet?
regards, tom lane