Re: ~*, case insensitiveness and national chars

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marcin Owsiany <marcin(at)owsiany(dot)pl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: ~*, case insensitiveness and national chars
Date: 2003-03-14 00:25:45
Message-ID: 12700.1047601545@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Marcin Owsiany <marcin(at)owsiany(dot)pl> writes:
> Consider the following commands:

> ] create database a encoding='LATIN2';
> ] \connect a
> ] create table a (a character(1));
> ] insert into a values(chr(161));
> ] insert into a values(chr(177));
> ] select count(a) from a where a ~* chr(161);

> On PostgreSQL 7.3.2 this returns 2 (which is correct, since chr(161) and
> chr(177) are the same character in LATIN2, just different case), but on
> postgresql 7.2.2, this returns 1.

Case equivalences are determined by locale, not encoding. Did you build
7.2 with locale support at all? Did you initdb it in an appropriate
locale?

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Partho Bhowmick 2003-03-14 01:27:54 Regular expressions in PostgreSQL
Previous Message Ryan Mahoney 2003-03-13 23:55:42 Re: Having an optional foreign key (ie. sometimes NULL) ?