Re: BUG #3788: POSIX regexp seems doesn't work for '(?!re) ' pattern - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #3788: POSIX regexp seems doesn't work for '(?!re) ' pattern
Date
Msg-id 14553.1196353452@sss.pgh.pa.us
Whole thread Raw
In response to BUG #3788: POSIX regexp seems doesn't work for '(?!re) ' pattern  ("Vitaly" <vitaly.yakunin@gmail.com>)
List pgsql-bugs
"Vitaly" <vitaly.yakunin@gmail.com> writes:
> SELECT author, type
>   FROM books WHERE "type" ~ '(?!novel)';

> This select work incorrect. It returns all types.

Certainly.  That's a negative-lookahead pattern and is therefore
guaranteed to match somewhere in every string (at the end, if
nowhere else).

            regards, tom lane

pgsql-bugs by date:

Previous
From: "Vitaly"
Date:
Subject: BUG #3788: POSIX regexp seems doesn't work for '(?!re) ' pattern
Next
From: NikhilS
Date:
Subject: Re: BUG #3774: create table like including index doesn't update pg_constraints with primary key