Re: [HACKERS] I don't like LIKE

From: Hannu Krosing <hannu(at)trust(dot)ee>
To: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
Cc: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>, Postgres Hackers List <hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] I don't like LIKE
Date: 1999-06-08 20:58:01
Message-ID: 375D83D9.DC50B2A0@trust.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian wrote:
>
> [Charset iso-8859-1 unsupported, filtering to ASCII...]
> > 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?
>
> Please post example. Works here:
>
> select * from pg_class where rename like '2';

Maybe he meant something like this (using 6.4.2)

hannu=> \d t

Table = t
+----------------------------------+----------------------------------+-------+
| Field | Type |
Length|
+----------------------------------+----------------------------------+-------+
| i | int4
| 4 |
+----------------------------------+----------------------------------+-------+
hannu=> create index indx on t(i);
CREATE
hannu=> vacuum;
VACUUM
hannu=> select * from t where i like '1';
ERROR: pg_atoi: error in "1ÿ": can't parse "ÿ"
hannu=>

---------------------
Hannu

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1999-06-08 21:14:59 Re: Release schedule
Previous Message The Hermit Hacker 1999-06-08 20:55:18 Re: Release schedule