DIfferent ORDER BY behaviour in 7.4.2 - Mailing list pgsql-general

From Gunasekaran Balakrishnan
Subject DIfferent ORDER BY behaviour in 7.4.2
Date
Msg-id 40FD0C64.30403@motorola.com
Whole thread Raw
Responses Re: DIfferent ORDER BY behaviour in 7.4.2  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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.



pgsql-general by date:

Previous
From: Marius Andreiana
Date:
Subject: Re: LOG table changes ...
Next
From: "raptor@tvskat.net"
Date:
Subject: pgadmin 3