Thread

  1. pg7.0.2 doesnt yield match on regexps w/ many "|"

    PostgreSQL Bugs List <pgsql-bugs@postgresql.org> — 2001-04-26T11:05:16Z

    Emils Klotins (emils@grafton.lv) reports a bug with a severity of 2
    The lower the number the more severe it is.
    
    Short Description
    pg7.0.2 doesnt yield match on regexps w/ many "|"
    
    Long Description
    Adding more than a very limited number of complexness to a regexp query will yield 0 rows without any error message.
    
    The example code below shows a very small table and a regexp with multiple choices: '(word|word|word)'
    
    as soon as another word is addded '(word|word|word|word)', OR the query changed to, for example, '(word|word|word) *', it returns 0 rows, although it should return the same (8 rows).
    
    My environment: RedHat Linux 6.2 on Alpha DS10, gcc version egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)
    
    
    Sample Code
    CREATE TABLE "test" (
            "title" text
    );
    COPY "test" FROM stdin;
    Serious Sam ce pie pircjiem
    Black & White gaidanas svtki
    Lorgaine: The Black Standard - eltu varoeposs
    Lorgaine: The Black Standard beta versija
    Black&White tomr neesot spiegu programma
    Black & White FAQ
    Black & White "aunais" FAQ
    Black & White - prdotk sple ASV
    \.
    
    SELECT title  FROM test WHERE title ~* '(BLACK|WHITE|SERIOUS|SAM)' ;
    ....
    (8 rows)
    
    
    SELECT title  FROM test WHERE title ~* '(BLACK|WHITE|SERIOUS|blah|SAM)' ;
     title
    -------
    (0 rows)
    
    
    
    No file was uploaded with this report