Thread: 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
"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
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) o= r 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 >=20 > 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. >=20 > regards, tom lane --=20 David =A9auer <david.sauer@videoplaneta.cz> www.videoplaneta.cz =E8len internetov=E9ho n=E1kupn=EDho centra www.123shop.cz nav=B9tivte na=B9e obchody: www.123mp3.cz www.fotoplaneta.cz a dal=B9=ED ...