David Garamond <lists(at)zara(dot)6(dot)isreserved(dot)com> writes:
> Is there a function like IS_VALID_REGEX() to check whether a pattern is
> valid (i.e. it compiles)? I'm storing a list of regex patterns in a
> table. It would be nice to be able to add a CHECK constraint to ensure
> that all the regexes are valid.
... CHECK (('' ~ pattern) IS NOT NULL) ...
regards, tom lane