Re: [HACKERS] I don't like LIKE

From: Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>
To: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
Cc: Postgres Hackers List <hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] I don't like LIKE
Date: 1999-06-08 14:19:13
Message-ID: Pine.GSO.3.96.SK.990608181753.16602K-100000@ra
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 8 Jun 1999, Thomas Lockhart wrote:

> Date: Tue, 08 Jun 1999 13:53:01 +0000
> From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
> To: Postgres Hackers List <hackers(at)postgreSQL(dot)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(at)alumni(dot)caltech(dot)edu
> South Pasadena, California
>

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 1999-06-08 14:28:42 Re: [HACKERS] 6.6 items
Previous Message Vadim Mikheev 1999-06-08 14:11:49 Re: [HACKERS] 6.6 items