Thread: Case sensitivity

Case sensitivity

From
Howard Cole
Date:
Has case sensitivity changed between 8.0.1 and 8.0.3 or am I missing
some setting somewhere?

I try the following sql on two database servers and get different results:

create table test (val varchar(10));
insert into test values ('A');
insert into test values ('a');
select * from test where val < 'a';

Results on 8.0.1 linux server (UNICODE)
 val
-----
(0 rows)

Results on 8.0.3 windows server (UNICODE)
 val
-----
 A
(1 row)

I am guessing that the 8.0.3 on windows is the correct version - but
what changes this and how can I set it?

regards

Howard Cole
www.selestial.com

Re: Case sensitivity

From
"Magnus Hagander"
Date:
> create table test (val varchar(10));
> insert into test values ('A');
> insert into test values ('a');
> select * from test where val < 'a';
>
> Results on 8.0.1 linux server (UNICODE)
>  val
> -----
> (0 rows)
>
> Results on 8.0.3 windows server (UNICODE)  val
> -----
>  A
> (1 row)
>
> I am guessing that the 8.0.3 on windows is the correct
> version - but what changes this and how can I set it?

UNICODE is not currently supported on win32. We hope to have this done
in 8.1, but in 8.0 bad things like this will happen. See
http://www.postgresql.org/docs/faqs.FAQ_windows.html#2.6.

//Magnus

Re: Case sensitivity

From
Tom Lane
Date:
Howard Cole <howard.cole@selestial.com> writes:
> Has case sensitivity changed between 8.0.1 and 8.0.3

Nope.

> Results on 8.0.3 windows server (UNICODE)

Unicode doesn't work at all well on Windows.  Consider using a different
encoding.  Also, you'd better check that you have matching locale and
encoding settings on both those installations ...

            regards, tom lane

Re: Case sensitivity

From
Howard Cole
Date:
I looked into the problem further - and could not repeat the problem on
my windows XP machine. The problem was isolated to a server which uses
the 64bit edition of W2K3 server. Otherwise the W2K3 64bit edition seems
to run PG ok.

Are there any plans for fixing the UNICODE encoding on Windows?

Regards,

Howard Cole
www.selestial.com


Re: Case sensitivity

From
"Magnus Hagander"
Date:
> I looked into the problem further - and could not repeat the
> problem on my windows XP machine. The problem was isolated to
> a server which uses the 64bit edition of W2K3 server.
> Otherwise the W2K3 64bit edition seems to run PG ok.
>
> Are there any plans for fixing the UNICODE encoding on Windows?

Yes. There is a patch floating around to use ICU, which will fix this
(amongst the other things it does). The hope is that it'll be completed
in time for 8.1.

//Magnus

Re: Case sensitivity

From
Howard Cole
Date:
Tom, Magnus.

Thanks for the great support.

Howard Cole
www.selestial.com

Magnus Hagander wrote:

>>Are there any plans for fixing the UNICODE encoding on Windows?
>>
>>
>
>Yes. There is a patch floating around to use ICU, which will fix this
>(amongst the other things it does). The hope is that it'll be completed
>in time for 8.1.
>
>//Magnus
>
>