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 23:08:12
Message-ID: 87wswgyxwj.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:

> Gregory Stark <stark(at)enterprisedb(dot)com> writes:
>> "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
>>> How so? The entries in the histogram are equidistant by definition.
>
>> Huh? They have equal number of values between them, they're not equidistant in
>> the scalar space. So the area of each bar should be the same but the width
>> would be proportional to the width of the bucket and the height inversely
>> proportional.
>
> You're presuming there exists a linear scalar space to reference the
> results to. I'm unconvinced that that's a good assumption to make.
> Consider for instance a column of URLs; practically all the entries will
> start with http or ftp or one of a small number of other possibilities.
> If you try to represent this with some hypothetical linear x-axis you
> are going to produce an unusable display.

I was planning to use the first and last histogram values for the frame of
reference. It could still produce some weird graphs but those cases are
precisely the cases where users might want to look at it and go, "hm, that
looks weird". In most sane cases I expect it'll make a nice pretty graph. It
remains to be seen though. All I have so far are synthetic integer domain
graphs which look just like what my synthetic distribution should look like.

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

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Ferruccio Zamuner 2007-07-31 23:46:32 Simple patch to report in log the schema name of the statement
Previous Message Tom Lane 2007-07-31 20:19:10 Re: Export user visible function to make use of convert_to_scalar