Unix Technical Forum

BUG #2286: Wrong index creation with cs_CZ locales and HYPHEN

This is a discussion on BUG #2286: Wrong index creation with cs_CZ locales and HYPHEN within the pgsql Bugs forums, part of the PostgreSQL category; --> The following bug has been logged online: Bug reference: 2286 Logged by: David Sauer Email address: profa@profa.cz PostgreSQL version: ...


Go Back   Unix Technical Forum > Database Server Software > PostgreSQL > pgsql Bugs

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-10-2008, 10:47 AM
David Sauer
 
Posts: n/a
Default BUG #2286: Wrong index creation with cs_CZ locales and HYPHEN


The following bug has been logged online:

Bug reference: 2286
Logged by: David Sauer
Email address: profa@profa.cz
PostgreSQL version: 8.1.2, 8.1.3
Operating system: Linux (libc6), debian
Description: Wrong index creation with cs_CZ locales and HYPHEN
Details:

I have table:

CREATE TABLE m (i TEXT);
CREATE INDEX myidx ON m(i);

.... INSERT about 2000 values INTO m in the form
INSERT INTO m VALUES ('some-hack-1');
INSERT INTO m VALUES ('some-hack-2');
INSERT INTO m VALUES ('some-hack-3');
INSERT INTO m VALUES ('some-hack-4');
........ approx 2000 values with 'HYPHEN' (-)

VACUUM FULL ANALYZE;

now, the query:
SELECT * FROM m WHERE i = 'some-hack-4';

finds nothing ...

but:

SELECT * FROM m WHERE i || '' = 'some-hack-4';

finds expected row (but without index use, so it is slow).

The problem is between libc6 2.3.2 and libc6 2.3.6, definition files are
stored at:

http://img.123shop.cz/gimg/Popis/a.zip

Problem is probably in libc6 locales, but postgresql developer knows more
about libc6 ... (not true in opposite direction ?)

I'am running current version of debian linux, postgres 8.1.2 or 8.1.3
compiled myself. Feel free to contact me for more details.

Thank You,

David Sauer

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-10-2008, 10:47 AM
Tom Lane
 
Posts: n/a
Default Re: BUG #2286: Wrong index creation with cs_CZ locales and HYPHEN

"David Sauer" <profa@profa.cz> writes:
> PostgreSQL version: 8.1.2, 8.1.3
> Operating system: Linux (libc6), debian
> Description: Wrong index creation with cs_CZ locales and HYPHEN


You've probably gotten bit by the 8.1.2 changes in locale-dependent
sorting. Try REINDEXing the affected indexes, as per the 8.1.2 release
notes.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-10-2008, 10:47 AM
David Sauer
 
Posts: n/a
Default Re: BUG #2286: Wrong index creation with cs_CZ locales and

No, the database was initialized new.

initdb -D /var/lib/pg-8.1.3 -E latin2

I have isolated problem to new locale definition file - glibc 2.3.6 with cs_CZ definition file from 2.3.2 works ok and raises if data contain '-'.
I'am still not sure if problem is in postgres (bad work with locale data) or in glibc locale data itself, older postgres than 8.1.2 still not tried.

Thanks,

On Mon, 27 Feb 2006 12:24:19 -0500
Tom Lane <tgl@sss.pgh.pa.us> wrote:

> "David Sauer" <profa@profa.cz> writes:
> > PostgreSQL version: 8.1.2, 8.1.3
> > Operating system: Linux (libc6), debian
> > Description: Wrong index creation with cs_CZ locales and HYPHEN

>
> You've probably gotten bit by the 8.1.2 changes in locale-dependent
> sorting. Try REINDEXing the affected indexes, as per the 8.1.2 release
> notes.
>
> regards, tom lane



--
David Šauer <david.sauer@videoplaneta.cz>
www.videoplaneta.cz
člen internetového nákupního centra www.123shop.cz
navštivte naše obchody: www.123mp3.cz www.fotoplaneta.cz a další ...

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:57 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com