From: Max Pyziur <pyz@panix.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-admin@postgresql.org
Cc: pgsql-sql@postgresql.org
Cc: pgsql-bugs@hub.org
Subject: Re: [SQL] Re: [BUGS] "ORDER BY" issue - is this a bug?
Date: Sun, 10 Sep 2000 23:16:19 -0400
Message-ID: <39BC4E83.E357F887@panix.com> (raw)
References: <39BBD09C.C8F6B3F8@panix.com>
<5410.968632518@sss.pgh.pa.us>
<39BC3003.FC5A3449@panix.com>
<9111.968637041@sss.pgh.pa.us>
Tom Lane wrote:
>
> 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.
Thanks for your quick replies.
I dropped my databases, uninstalled the 7.0.2-2 rpms and installed 6.5.3 rpms on
my development RH6.2 Linux 2.2.14-5.0 system and I still get the anomalous query
result on that box.
> 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().
There is a $LANG variable which is set to en_US; is this what might be causing
the problem? I've tried unsetting it (unset LANG) and still get the problem.
Is there something else which I should be looking at?
> 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?
Running EXPLAIN the results are:
headlines1=> explain select headline from headlines where headline like 'Alb%'
order by 1 ;
NOTICE: QUERY PLAN:
Sort (cost=221.15 rows=1 width=12)
-> Seq Scan on headlines (cost=221.15 rows=1 width=12)
EXPLAIN
> regards, tom lane
Thanks again,
Max Pyziur BRAMA - Gateway Ukraine
pyz@brama.com http://www.brama.com/
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: pyz@panix.com, tgl@sss.pgh.pa.us, pgsql-admin@postgresql.org, pgsql-bugs@hub.org
Subject: Re: [SQL] Re: [BUGS] "ORDER BY" issue - is this a bug?
In-Reply-To: <39BC4E83.E357F887@panix.com>
References: <39BBD09C.C8F6B3F8@panix.com> <5410.968632518@sss.pgh.pa.us> <39BC3003.FC5A3449@panix.com> <9111.968637041@sss.pgh.pa.us> <39BC4E83.E357F887@panix.com>
* 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