Re: [HACKERS] I don't like LIKE

Поиск
Список
Период
Сортировка
От Oleg Bartunov
Тема Re: [HACKERS] I don't like LIKE
Дата
Msg-id Pine.GSO.3.96.SK.990608181753.16602K-100000@ra
обсуждение исходный текст
Ответ на I don't like LIKE  (Thomas Lockhart <lockhart@alumni.caltech.edu>)
Список pgsql-hackers
On Tue, 8 Jun 1999, Thomas Lockhart wrote:

> Date: Tue, 08 Jun 1999 13:53:01 +0000
> From: Thomas Lockhart <lockhart@alumni.caltech.edu>
> To: Postgres Hackers List <hackers@postgreSQL.org>
> Subject: [HACKERS] I don't like LIKE
> 
> There seems to be a problem with MakeIndexable(), though I haven't
> confirmed that the problem lies there:
> 
> postgres=> select * from t1 where i like '2';
> ERROR:  pg_atoi: error in "2Ъ": can't parse "Ъ"
> 
> istm that this query should behave itself, or at least fail in some
> other way :(
> 
> I'll guess that, even though there isn't a wildcard to pattern match,
> MakeIndexable() is adding a trailing \377 to the string?

Just run on fresh cvs:
test=> \d t1 
Table    = t1
+----------------------------------+----------------------------------+-------+
|              Field               |              Type                | Length|
+----------------------------------+----------------------------------+-------+
| id                               | int4 not null                    |     4 |
| a                                | varchar()                        |     4 |
+----------------------------------+----------------------------------+-------+
Index:    id_t1

test=> select * from t1 where id like '2';
id|a  
--+---2|at1
(1 row)

It seems it's run ok, because I used --enable-locale option.
Regards,
    Oleg

> 
>                 - Thomas
> 
> -- 
> Thomas Lockhart                lockhart@alumni.caltech.edu
> South Pasadena, California
> 

_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Maarten Boekhold
Дата:
Сообщение: Re: [HACKERS] PID of backend
Следующее
От: Thomas Lockhart
Дата:
Сообщение: Re: [HACKERS] 6.6 items