pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Mark Dilger <mark.dilger@enterprisedb.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@lists.postgresql.org>
Subject: Re: Test harness for regex code (to allow importing Tcl's test suite)
Date: Mon, 04 Jan 2021 00:47:16 -0500
Message-ID: <2878372.1609739236@sss.pgh.pa.us> (raw)
In-Reply-To: <00A426B2-983A-4996-AF66-C9511B88FFC3@enterprisedb.com>
References: <2873268.1609732164@sss.pgh.pa.us>
	<00A426B2-983A-4996-AF66-C9511B88FFC3@enterprisedb.com>

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 slightly different interface that doesn't throw on regex compilation error?  Maybe something in contrib?  It might be useful to 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





view thread (6+ messages)  latest in thread

Message-ID: <2878372.1609739236@sss.pgh.pa.us>
Permalink:  ../2878372.1609739236@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2878372.1609739236@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, mark.dilger@enterprisedb.com, pgsql-hackers@lists.postgresql.org
  Subject: Re: Test harness for regex code (to allow importing Tcl's test suite)
  In-Reply-To: <2878372.1609739236@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox