pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Max Pyziur <pyz@panix.com>
Cc: pgsql-admin@postgresql.org
Cc: pgsql-sql@postgresql.org
Cc: pgsql-bugs@hub.org
Subject: Re: [BUGS] "ORDER BY" issue - is this a bug?
Date: Sun, 10 Sep 2000 21:50:41 -0400
Message-ID: <9111.968637041@sss.pgh.pa.us> (raw)
In-Reply-To: <39BC3003.FC5A3449@panix.com>
References: <39BBD09C.C8F6B3F8@panix.com>
	<5410.968632518@sss.pgh.pa.us>
	<39BC3003.FC5A3449@panix.com>

Max Pyziur <pyz@panix.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



view thread (7+ messages)  latest in thread

Message-ID: <9111.968637041@sss.pgh.pa.us>
Permalink:  ../9111.968637041@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/9111.968637041@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pyz@panix.com, pgsql-admin@postgresql.org, pgsql-bugs@hub.org
  Subject: Re: [BUGS] "ORDER BY" issue - is this a bug?
  In-Reply-To: <9111.968637041@sss.pgh.pa.us>
  References: <39BBD09C.C8F6B3F8@panix.com> <5410.968632518@sss.pgh.pa.us> <39BC3003.FC5A3449@panix.com> <9111.968637041@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox