DIfferent ORDER BY behaviour in 7.4.2

From: Gunasekaran Balakrishnan <guna(at)motorola(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: DIfferent ORDER BY behaviour in 7.4.2
Date: 2004-07-20 12:13:24
Message-ID: 40FD0C64.30403@motorola.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,
I am seeing a different sorting behaviour for varchar columns in
Postgres 7.4.2.

postgres 7.4.2 is ignoring case for varchar columns for "ORDER BY"
commands where as 7.2.2 is not.

I am in a situation where I need to do diff from the select outputs of
two databases - one in 7.2.2 and one in 7.4.2.

So, is there any way I can force the ORDER BY to ignore case or
to not ignore case ?

The test results are as follows:

CREATE TABLE testSort (
testing varchar(32));

INSERT INTO testSort VALUES ('abc');
INSERT INTO testSort VALUES ('Abd');
INSERT INTO testSort VALUES ('aBc');
INSERT INTO testSort VALUES ('Cbaa');

select * from testSort order by testing;

In Postgres 7.2.2:
------------------
TEST=# select * from testSort order by testing;
testing
---------
Abd
Cba
aBc
abc
(4 rows)

In Postgres 7.4.2:
------------------
TEST=# select * from testSort order by testing;
testing
---------
aBc
abc
Abd
Cbaa
(4 rows)

Thanks in advance,
guna.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-07-20 13:17:16 Re: DIfferent ORDER BY behaviour in 7.4.2
Previous Message Marius Andreiana 2004-07-20 12:10:45 Re: LOG table changes ...