From: | "Ross J(dot) Reedstrom" <reedstrm(at)rice(dot)edu> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Peter Eisentraut <peter_e(at)gmx(dot)net>, Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>, pgsql-hackers(at)hub(dot)org |
Subject: | Re: Re: [GENERAL] +/- Inf for float8's |
Date: | 2000-08-21 19:32:08 |
Message-ID: | 20000821143208.B17981@rice.edu |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Mon, Aug 21, 2000 at 01:39:32PM -0400, Tom Lane wrote:
> "Ross J. Reedstrom" <reedstrm(at)rice(dot)edu> writes:
> > While examining the output from ORDER BY queries, both using and not using
> > an index, I came across a discrepancy: the explicit handling of NULLs in
> > the tuplesort case always sorts NULLs to the end, regardless of direction
> > of sort.
>
> Yeah. I think that's widely considered a bug --- we have a TODO item to
> fix it. You might care to dig in the archives for prior discussions.
I'll take a look.
>
> > To make the direct sort the same as the index read would work for NULL,
> > but for NaN would either require allowing NaN to be returned as >
> > Infinity, which doesn't happen now,
>
> Seems to me the sort order should be
>
> -Infinity
> normal values
> +Infinity
> other types of NaN
> NULL
>
> and the reverse in a descending sort.
>
> > or add another ordering operator that is only used for the sort case
> > (use of '>' and '<' seems to be hardcoded all the way to the parser)
>
> don't even think about that...
Sure, but any ideas _how_ to get 'NaN > +Infinity' to happen only during a
sort operation, and not when '>' is called explicity as a WHERE condition,
by touching only type specific code? 'Cause I'd call it a bug to be able
to say:
SELECT * from foo where f8 > 'Infinity';
and get anything at all back.
NULL is taken care of by special casing in the sort code, as I already mentioned,
and can be fixed immediately.
Ross
--
Ross J. Reedstrom, Ph.D., <reedstrm(at)rice(dot)edu>
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St., Houston, TX 77005
From | Date | Subject | |
---|---|---|---|
Next Message | Don Baccus | 2000-08-21 19:36:12 | Re: Bug tracking (was Re: +/- Inf for float8's) |
Previous Message | Don Baccus | 2000-08-21 19:30:46 | Re: Bug tracking (was Re: +/- Inf for float8's) |