Re: Export user visible function to make use of convert_to_scalar

From: Gregory Stark <stark(at)enterprisedb(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Export user visible function to make use of convert_to_scalar
Date: 2007-07-31 17:28:25
Message-ID: 87ps28wkhy.fsf@oxford.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

"Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> 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.

Then the charting tool would have to duplicate all the same code that
convert_to_scalar has to figure out what to do with the data.

What I can generate already is a bar chart for integer data types. But I think
it would be most useful for string data types. In one of the cases I've helped
someone with before they had comment spam constituting a sizable fraction of
their database throwing off statistics and forcing a sequential scan.

It might be simplest to expose an extern definition of the C function with a
comment saying it's internal and changes are planned.

Incidentally, I wonder if it makes more sense to make this an optional btree
operator class support procedure rather than a type function.

--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2007-07-31 17:31:06 Re: Export user visible function to make use of convert_to_scalar
Previous Message Tom Lane 2007-07-31 17:21:20 Re: [PATCHES] allow CSV quote in NULL