From: | Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Constantin Teodorescu <teo(at)flex(dot)ro> |
Cc: | PostgreSQL Interfaces <pgsql-interfaces(at)postgreSQL(dot)org>, "pgsql-hackers(at)postgreSQL(dot)org" <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Re: [HACKERS] Broken select on regular expression !!! |
Date: | 1999-07-07 18:25:26 |
Message-ID: | 199907071825.OAA05675@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-interfaces |
Fixed in 6.5 final.
> Hi all,
>
> I think I have found a bug in regexp based selections.
> Watch this :
>
> create table regdemo (fld1 varchar(32));
> CREATE
> insert into regdemo values('410');
> INSERT 726409 1
> insert into regdemo values('7410');
> INSERT 726410 1
> insert into regdemo values('source');
> INSERT 726411 1
> insert into regdemo values('destination');
> INSERT 726412 1
> select * from regdemo where fld1 ~* '^sou|^des';
> fld1
> -----------
> source
> destination
> (2 rows)
>
> select * from regdemo where fld1 ~* '41|^des';
> fld1
> -----------
> 410
> 7410
> destination
> (3 rows)
>
> select * from regdemo where fld1 ~* '^41|^des';
> fld1
> ----
> (0 rows)
>
> ^^^^^^^^^^^^^^
> !?!?!?!
> I thought it should return '410' and 'destination' rows. But it returns
> nothing!
> The first select example with ^ in both variants ( ^sou|^des ) works !!!
> The last one ( ^41|^des ) don't !
>
> Am I missing something?
> I am getting the same result also on 6.4.2 and 6.5 beta 1 versions!
>
> Best regards,
> --
> Constantin Teodorescu
> FLEX Consulting Braila, ROMANIA
>
>
--
Bruce Momjian | http://www.op.net/~candle
maillist(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 1999-07-07 18:32:17 | Re: [HACKERS] drop user doesn't remove rights from tables ... |
Previous Message | Bruce Momjian | 1999-07-07 18:23:55 | Re: [SQL] Oddities with NULL and GROUP BY |
From | Date | Subject | |
---|---|---|---|
Next Message | Hub.Org News Admin | 1999-07-07 18:39:39 | |
Previous Message | Steven Bradley | 1999-07-07 18:11:00 | Index on TIMESTAMP |