pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Broken select on regular expression  !!!
2+ messages / 2 participants
[nested] [flat]

* Broken select on regular expression  !!!
@ 1999-05-19 13:49 Constantin Teodorescu <teo@flex.ro>
  1999-07-07 18:25 ` Re: [HACKERS] Broken select on regular expression  !!! Bruce Momjian <maillist@candle.pha.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Constantin Teodorescu @ 1999-05-19 13:49 UTC (permalink / raw)
  To: pgsql-interfaces; pgsql-hackers@postgreSQL.org <pgsql-hackers@postgresql.org>

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: [HACKERS] Broken select on regular expression  !!!
  1999-05-19 13:49 Broken select on regular expression  !!! Constantin Teodorescu <teo@flex.ro>
@ 1999-07-07 18:25 ` Bruce Momjian <maillist@candle.pha.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Bruce Momjian @ 1999-07-07 18:25 UTC (permalink / raw)
  To: Constantin Teodorescu <teo@flex.ro>; +Cc: pgsql-interfaces; pgsql-hackers@postgreSQL.org <pgsql-hackers@postgreSQL.org>


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@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~1999-07-07 18:25 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-05-19 13:49 Broken select on regular expression  !!! Constantin Teodorescu <teo@flex.ro>
1999-07-07 18:25 ` Bruce Momjian <maillist@candle.pha.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox