Lists: | Postg토토 사이트SQL |
---|
From: | Unprivileged user <nobody> |
---|---|
To: | pgsql-ports(at)postgresql(dot)org |
Subject: | Port Bug Report: Incorrect search using 'select .... like ...' statement. |
Date: | 1999-05-13 11:17:53 |
Message-ID: | 199905131117.HAA32748@hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | Postg젠 토토SQL |
============================================================================
POSTGRESQL BUG REPORT TEMPLATE
============================================================================
Your name : Misha Yakin
Your email address : misha(at)libr-115c(dot)ksu(dot)ru
Category : runtime: back-end: SQL
Severity : serious
Summary: Incorrect search using 'select .... like ...' statement.
System Configuration
--------------------
Operating System : Linux 2.2.3 ELF(Red Hat 5.0)
PostgreSQL version : 6.4.2
Compiler used : gcc 2.7.2.3
Hardware:
---------
Pentium 166, 32M RAM.
uname -a:
Linux libr-115c.ksu.ru 2.2.3 #1 12 17:09:04 MSK 1999 i586 unknown
Versions of other tools:
------------------------
GNU Make version 3.76.1, flex version 2.5.4,
gcc version 2.7.2.3, glibc 2.0.7
--------------------------------------------------------------------------
Problem Description:
--------------------
Sometimes expresion like 'select a from b where a like 'abc%';' gives
null result, while 'select a from b where a like 'abcd%';' gives
right result (several records). In some case first expression
gives some result but it doesn't contains result of the second
one... But expresion '... like 'ab%';' gives result containing
results of the first an the second.
--------------------------------------------------------------------------
Test Case:
----------
All fields I tried contain russian characters (there was some
fields with english characters but I don't find such error with them)
example:
vkuzmina=> select tit from cvcat where lower(tit) like '%';
tit
-----------------
(1 row)
vkuzmina=> select tit from cvcat where lower(tit) like '%';
tit
---
(0 rows)
vkuzmina=> select tit from cvcat where lower(tit) like '%';
tit
-----------------
(1 row)
vkuzmina=> select tit from cvcat where tit like '%';
tit
-----------------
(1 row)
vkuzmina=> select tit from cvcat where tit like '%';
tit
---
(0 rows)
vkuzmina=> select tit from cvcat where tit like '%';
tit
-----------------
(1 row)
--------------------------------------------------------------------------
Solution:
---------
--------------------------------------------------------------------------
From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Misha Yakin <misha(at)libr-115c(dot)ksu(dot)ru> |
Cc: | pgsql-ports(at)postgreSQL(dot)org |
Subject: | Re: [PORTS] Port Bug Report: Incorrect search using 'select .... like ...' statement. |
Date: | 1999-05-13 15:56:27 |
Message-ID: | 199905131556.LAA13253@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | Postg토토 사이트SQL |
> Sometimes expresion like 'select a from b where a like 'abc%';' gives
> null result, while 'select a from b where a like 'abcd%';' gives
> right result (several records). In some case first expression
> gives some result but it doesn't contains result of the second
> one... But expresion '... like 'ab%';' gives result containing
> results of the first an the second.
>
> --------------------------------------------------------------------------
>
> Test Case:
> ----------
> All fields I tried contain russian characters (there was some
> fields with english characters but I don't find such error with them)
>
>
> example:
>
> vkuzmina=> select tit from cvcat where lower(tit) like '%';
> tit
> -----------------
>
> (1 row)
>
> vkuzmina=> select tit from cvcat where lower(tit) like '%';
> tit
> ---
> (0 rows)
>
> vkuzmina=> select tit from cvcat where lower(tit) like '%';
> tit
> -----------------
>
> (1 row)
>
> vkuzmina=> select tit from cvcat where tit like '%';
> tit
> -----------------
>
> (1 row)
>
> vkuzmina=> select tit from cvcat where tit like '%';
> tit
> ---
> (0 rows)
>
> vkuzmina=> select tit from cvcat where tit like '%';
> tit
> -----------------
>
> (1 row)
>
We have some problems with international characters sets and index
usage. Someone else will probably give a better answer.
--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026