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