The following bug has been logged online:
Bug reference: 3788
Logged by: Vitaly
Email address: vitaly(dot)yakunin(at)gmail(dot)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)');