LIKE bug
Moucha Václav <mouchav@radiomobil.cz>
From: Moucha Václav <MouchaV@Radiomobil.cz>
To: "'pgsql-bugs@postgresql.org'" <pgsql-bugs@postgresql.org>
Date: 2000-06-07T08:16:15Z
Lists: pgsql-bugs, pgsql-hackers
============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================
Your name : Vaclav Moucha
Your email address : mouchav@radiomobil.cz
System Configuration
---------------------
Architecture (example: Intel Pentium) : Intel
Pentium III/350
Operating System (example: Linux 2.0.26 ELF) : Linux 2.2.14
PostgreSQL version (example: PostgreSQL-6.5.1): postgresql-7.0.1
Compiler used (example: gcc 2.8.0) : gcc version
egcs-2.91.66
19990314 (egcs-1.1.2 release)
Please enter a FULL description of your problem:
------------------------------------------------
I will find out some bug with like operator if I use locales.
Steps to involve a bug result:
1. Compilation
./configure --enable-locale # not needed for RPMS precompiled binaries
2. Starting postmaster
export LC_CTYPE=cs_CZ
export LC_COLLATE=cs_CZ # this setting is important for the
bug result
postmaster -S -D /home/pgsql/data -o '-Fe'
3. SQL steps
create table test (name text);
insert into test values ('á'); # the first char is E1 from LATIN 2
coding
insert into test values ('áb');
create index test_index on test (name);
set cpu_tuple_cost=1; # force backend to use index
scanning
select * from test where name like 'á%';
BUG: Only 1 line is selected with 'á' only instead of both lines.
Please describe a way to repeat the problem. Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------
If you know how this problem might be fixed, list the solution below:
---------------------------------------------------------------------