Skip site navigation (1) Skip section navigation (2)

Re: [BUGS] "ORDER BY" issue - is this a bug?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Max Pyziur <pyz(at)panix(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org, pgsql-sql(at)postgresql(dot)org, pgsql-bugs(at)hub(dot)org
Subject: Re: [BUGS] "ORDER BY" issue - is this a bug?
Date: 2000-09-11 01:50:41
Message-ID: 9111.968637041@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-adminpgsql-bugspgsql-sql
Max Pyziur <pyz(at)panix(dot)com> writes:
>> That's pretty bizarre (not to say difficult to believe).  What LOCALE
>> setting are you running the postmaster in?

> On none of the installations - the two 6.5.x and the 7.0.2-2 one - I
> don't have any locale set.  I get (what I think are) correct results
> with the first two.

> Does 7.0.2-2 require the setting of locale.

AFAIK its behavior should be the same as 6.5 for LOCALE issues.  That's
why I suspect an environment difference.

I can assure you there is no code in the backend that will do
case-insensitive, punctuation-insensitive comparisons --- much less any
to do so without request.  I'm betting that either this is your error,
or the strcmp() library function is doing it; and as far as I've heard,
only LOCALE environment variables might affect the behavior of strcmp().

It also seems possible that no sort is happening at all (which would be
a planner bug), and the ordering you're getting is just whatever happens
to be in the underlying table.  Does EXPLAIN show that the query is
being done with an explicit sort?

			regards, tom lane

In response to

Responses

pgsql-admin by date

Next:From: Max PyziurDate: 2000-09-11 03:16:19
Subject: Re: [SQL] Re: [BUGS] "ORDER BY" issue - is this a bug?
Previous:From: Max PyziurDate: 2000-09-11 01:06:11
Subject: Re: [BUGS] "ORDER BY" issue - is this a bug?

pgsql-bugs by date

Next:From: Max PyziurDate: 2000-09-11 03:16:19
Subject: Re: [SQL] Re: [BUGS] "ORDER BY" issue - is this a bug?
Previous:From: Max PyziurDate: 2000-09-11 01:06:11
Subject: Re: [BUGS] "ORDER BY" issue - is this a bug?

pgsql-sql by date

Next:From: Max PyziurDate: 2000-09-11 03:16:19
Subject: Re: [SQL] Re: [BUGS] "ORDER BY" issue - is this a bug?
Previous:From: Max PyziurDate: 2000-09-11 01:06:11
Subject: Re: [BUGS] "ORDER BY" issue - is this a bug?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group