Re: Test harness for regex code (to allow importing Tcl's test suite) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Test harness for regex code (to allow importing Tcl's test suite)
Date
Msg-id 2878372.1609739236@sss.pgh.pa.us
Whole thread Raw
In response to Re: Test harness for regex code (to allow importing Tcl's test suite)  (Mark Dilger <mark.dilger@enterprisedb.com>)
Responses Re: Test harness for regex code (to allow importing Tcl's test suite)
List pgsql-hackers
Mark Dilger <mark.dilger@enterprisedb.com> writes:
> Have you thought about whether If it weren't in test/modules, it might be nice to expose test_regex from SQL with a
slightlydifferent interface that doesn't throw on regex compilation error?  Maybe something in contrib?  It might be
usefulto some users to validate regular expressions.  I'm just asking... I don't have any problem with how you have it
here.

Hm.  There isn't anything about test_regex()'s API that I would want
to expose to end users ;-) ... it's just designed to replicate the
test API that Henry Spencer designed a couple decades ago, which IMO
was not too clean even by the standards of the time.

However, I can see the argument for a function along the lines of
"validate_regex(text) returns bool".  If you or somebody else wants to
write that, independently of this patch, I think it'd be a fine idea.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Mark Dilger
Date:
Subject: Re: Test harness for regex code (to allow importing Tcl's test suite)
Next
From: torikoshia
Date:
Subject: Re: adding wait_start column to pg_locks