Group: pgsql.bugs


Subject: BUG #3788: POSIX regexp seems doesn't work for '(?!re) ' pattern
From: vitaly.yakunin@gmail.com ("Vitaly")
Date: 11/29/2007 3:35:24 PM
The following bug has been logged online: Bug reference: 3788 Logged by: Vitaly Email address: vitaly.yakunin@gmail.com PostgreSQL version: 8.3-beta3 Operating system: WinXP Description: POSIX regexp seems doesn't work for '(?!re) ' pattern Details: SELECT author, type FROM books WHERE "type" ~ '(?!novel)'; This select work incorrect. It returns all types. Work around: SELECT author, type FROM books WHERE not ("type" ~ '(?=novel)'); ---------------------------(end of broadcast)--------------------------- TIP 9: In versions below 8.0, the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match

Subject: BUG #3788: POSIX regexp seems doesn't work for '(?!re) ' pattern
From: tgl@sss.pgh.pa.us (Tom Lane)
Date: 11/29/2007 11:24:12 AM
"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 ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend