Re: [HACKERS] Bug in LIKE ? - Mailing list pgsql-hackers

From Daniele Orlandi
Subject Re: [HACKERS] Bug in LIKE ?
Date
Msg-id 375BBAC2.C7FD2D4D@orlandi.com
Whole thread Raw
In response to Re: [HACKERS] Bug in LIKE ?  (The Hermit Hacker <scrappy@hub.org>)
Responses Re: [HACKERS] Bug in LIKE ?
Re: [HACKERS] Bug in LIKE ?
List 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.comViaMezzera 29/A - 20030 - Seveso (MI) - Italy
 
-------------------------------------------------------------------------------




pgsql-hackers by date:

Previous
From: Vadim Mikheev
Date:
Subject: Re: [HACKERS] postgresql-v6.5beta2.tar.gz ...
Next
From: Oleg Bartunov
Date:
Subject: Re: [HACKERS] Bug in LIKE ?