Regular expression validation

From: Jakub Ouhrabka <jouh8664(at)ss1000(dot)ms(dot)mff(dot)cuni(dot)cz>
To: pgsql-general(at)postgresql(dot)org
Subject: Regular expression validation
Date: 2002-07-19 10:00:08
Message-ID: Pine.LNX.4.44.0207191148200.3396-100000@server
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

is there any function in postgresql saying me if the given regular
expression is valid? I store regular expressions in a table and then
perform some searches using ~* operator. But when the stored regular
expression is invalid (eg '+') then the query with ~* fails (ERROR:
Invalid regular expression: ?, *, or + operand invalid.) I'd like to have
a check constraint on that column storing regular expressions, so that no
one can insert invalid data and cause failing of other queries... Is there
any simple way?

thanks, kuba

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steve Brett 2002-07-19 11:23:14 Re: COMMIT in PostgreSQL
Previous Message Janning Vygen 2002-07-19 09:54:48 Re: select a ranking