Re: [HACKERS] Bug in LIKE ?

From: Daniele Orlandi <daniele(at)orlandi(dot)com>
To: The Hermit Hacker <scrappy(at)hub(dot)org>
Subject: Re: [HACKERS] Bug in LIKE ?
Date: 1999-06-07 12:27:46
Message-ID: 375BBAC2.C7FD2D4D@orlandi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> If I understand this correctly, IMHO, this would be asking for '^Sigma'
> with at least one character after the 'a' ...

Uhm.... I think the problem is a little worse:

create table a ( b varchar(32) );
insert into a values ( 'foo' );
insert into a values ( 'bar' );
insert into a values ( 'foobar' );
insert into a values ( 'foobar2' );

PostgreSQL 6.4.2

tacacs=> select * from a where b like 'foo%';
b
-------
foo
foobar
foobar2
(3 rows)

PostgreSQL 6.5beta2

tacacs=> select * from a where b like 'foo%';
b
-
(0 rows)

tacacs=> select * from a where b like '%foo';
b
---
foo
(1 row)

tacacs=> select * from a where b ~ '^foo';
b
-------
foo
foobar
foobar2
(3 rows)

Bye.

--
Daniele

-------------------------------------------------------------------------------
Daniele Orlandi - Utility Line Italia - http://www.orlandi.com
Via Mezzera 29/A - 20030 - Seveso (MI) - Italy
-------------------------------------------------------------------------------

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleg Bartunov 1999-06-07 13:00:11 Re: [HACKERS] Bug in LIKE ?
Previous Message Duane Currie 1999-06-07 11:03:14 PGSQL Interface for Smalltalk?