Re: Quering by Regular Expressions stored in table - Mailing list pgsql-general

From Tom Lane
Subject Re: Quering by Regular Expressions stored in table
Date
Msg-id 15094.1148400871@sss.pgh.pa.us
Whole thread Raw
In response to Quering by Regular Expressions stored in table  (Allen Fair <dba@girders.org>)
List pgsql-general
Allen Fair <dba@girders.org> writes:
> Hi! I have a table with a character column (called match_regex)
> containing a POSIX regular expression, hoping to have Postgres use it
> while evaluating the "where" predicate. The following error occurs:

> SELECT *
> from patterns
> where 'blah blah blah' ~ match_regex;

> ERROR:  invalid regular expression: quantifier operand invalid

This means there's at least one value in the column that's not a legal
regex (* at the front is one possible cause, IIRC).

            regards, tom lane

pgsql-general by date:

Previous
From: Frederic Massot
Date:
Subject: Re: To recover data corrupted
Next
From: Yonatan Ben-Nes
Date:
Subject: Trying to update a box data type column