Skip site navigation (1) Skip section navigation (2)

Re: BUG #1931: ILIKE and LIKE fails on Turkish locale

From: Victor Snezhko <snezhko(at)indorsoft(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Volkan YAZICI <yazicivo(at)ttnet(dot)net(dot)tr>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #1931: ILIKE and LIKE fails on Turkish locale
Date: 2006-09-23 07:20:48
Message-ID: uhcyzm4kv.fsf@indorsoft.ru (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-tr-genel
Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

>> ... I think we need convert_ident to
>> use a plpgsql_isspace() that accepts these and only these as spaces.
>> Any high-bit-set byte is part of an identifier according to scan.l's
>> rules, and convert_ident must have the same behavior regardless of locale.
>
>> There may be related risks in and around the other flex scanners
>> ... will look.
>
> I've committed a fix along these lines.  ecpg had the identical bug, but
> I couldn't find any other places where we seemed to be assuming that
> <ctype.h> macros would match the behavior of our flex scanners.

Thank you, your commit has fixed this issue. 

The issue with empty table names (when they are multibyte) remains.

The following queries work as expected:

(I use table named as "т" - Unicode 0442, and column named as "к" -
Unicode id 043A) 

CREATE TABLE т (
  к int NOT NULL,
  PRIMARY KEY (к)
);

INSERT INTO т (к) VALUES (1);

SELECT * FROM т;

However, in system catalogs (SELECT * FROM pg_tables WHERE
schemaname='public') there appears to be empty strings instead  
of table names.

This is on patched 8.1.4 (with ILIKE and ctype.h fixes), I'm upgrading
to HEAD now to see if anything improved.

-- 
WBR, Victor V. Snezhko
E-mail: snezhko(at)indorsoft(dot)ru



In response to

Responses

pgsql-tr-genel by date

Next:From: Victor SnezhkoDate: 2006-09-23 09:59:04
Subject: Re: BUG #1931: ILIKE and LIKE fails on Turkish locale
Previous:From: Tom LaneDate: 2006-09-22 21:41:53
Subject: Re: BUG #1931: ILIKE and LIKE fails on Turkish locale

pgsql-bugs by date

Next:From: Victor SnezhkoDate: 2006-09-23 09:59:04
Subject: Re: BUG #1931: ILIKE and LIKE fails on Turkish locale
Previous:From: Tom LaneDate: 2006-09-22 21:41:53
Subject: Re: BUG #1931: ILIKE and LIKE fails on Turkish locale

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group