RE: Found an example prooving bug

From: Marcin Zukowski <mz174771(at)students(dot)mimuw(dot)edu(dot)pl>
To: Piers Scannell <piers(dot)scannell(at)globecastne(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: RE: Found an example prooving bug
Date: 2001-05-03 18:32:39
Message-ID: Pine.LNX.4.21.0105032009110.13351-100000@zodiac.mimuw.edu.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

> From my point of view, NULL is neither bigger, nor smaller, you can't
> compare it with a number.
> So it just comes at the end if you sort at all.
Well, I know you can't compare null in, for example, WHERE clause. But if
we want to sort data in some way, I would like Postgres to behave in any,
but predictable, way. If last of the query execution steps is sorting,
null values are always at the end. And it would be OK, but, depending on
the query, values in database, and some options (like ENABLE_SORT),
null-values are sometimes at the beginning, because it uses order stored
in index.
Also, for my bug-report Tom Lane replied with some details from SQL92
specs. And my last mail, with an example (I can wrote less complex
one) shows, that pgsql doesn't work the way SQL92 says. So, is it
compliant with SQL92 standard in this matter or is it not? If it's not,
shouldn't that be changed?
> (Perhaps you need to take a think about what NULL means in your data. Should
> NULL sort as if it's 0?, +infinity?, -infinity? if so why?)
As I wrote - any way. But fixed one.
To finish this problem - I've changed my program to use -infinity for null
values (but I really don't like it :) ). I still think pgsql is not
compliant with SQL92, but I'm not the one to decide if it should be
changed.

Best regards

Marcin Zukowski

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message pgsql-bugs 2001-05-03 18:35:12 Error in Makefile.tcldefs
Previous Message Tom Lane 2001-05-03 18:14:49 Re: \dT macaddr helptext bug.

Browse pgsql-hackers by date

  From Date Subject
Next Message Jani Averbach 2001-05-03 18:42:50 A bug with pgsql 7.1/jdbc and non-ascii (8-bit) chars?
Previous Message bpalmer 2001-05-03 18:20:50 Re: Re: New Linux xfs/reiser file systems