Re: Export user visible function to make use of convert_to_scalar - Mailing list pgsql-patches

From Tom Lane
Subject Re: Export user visible function to make use of convert_to_scalar
Date
Msg-id 26551.1185901813@sss.pgh.pa.us
Whole thread Raw
In response to Re: Export user visible function to make use of convert_to_scalar  (Gregory Stark <stark@enterprisedb.com>)
Responses Re: Export user visible function to make use of convert_to_scalar
List pgsql-patches
Gregory Stark <stark@enterprisedb.com> writes:
> "Tom Lane" <tgl@sss.pgh.pa.us> writes:
>> Gregory Stark <stark@enterprisedb.com> writes:
>>> Attached is a patch which implements, as discussed briefly on -hackers, a
>.> user-visible function to get at the information that convert_to_scalar uses to
>>> generate selectivity estimates.
>>
>> This is an astonishingly bad idea, as it exposes and thereby sets in
>> stone one of the worst, most in-need-of-rethinking areas in selfuncs.c.

> No, it sets in stone only the concept that at some point somehow we'll have to
> come up with an estimate of where a value lies in a range.

The problem is how much of the actual behavior of that function gets
exposed, and in particular what context it needs to make the estimate.
Further down the road, for example, we might need a locale as an input.

When complaining I hadn't read the pghackers thread in which you
suggested this, and now that I'm caught up on email I remain
unconvinced.  What do you need convert_to_scalar for in order to display
the pg_statistic histogram?  You've already got the underlying data.

            regards, tom lane

pgsql-patches by date:

Previous
From: Gregory Stark
Date:
Subject: Re: HOT latest patch - version 8
Next
From: Gregory Stark
Date:
Subject: Re: Export user visible function to make use of convert_to_scalar