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