Re: Standard REGEX functions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Standard REGEX functions
Date
Msg-id 252591.1671373497@sss.pgh.pa.us
Whole thread Raw
In response to Standard REGEX functions  (Vik Fearing <vik@postgresfriends.org>)
Responses Re: Standard REGEX functions
List pgsql-hackers
Vik Fearing <vik@postgresfriends.org> writes:
> Are there any objections to me writing a patch to add SQL Standard 
> regular expression functions even though they call for XQuery and we 
> would use our own language?

Yes.  If we provide spec-defined syntax it should have spec-defined
behavior.  I really don't see the value of providing different
syntactic sugar for functionality we already have, unless the point
of it is to be spec-compliant, and what you suggest is exactly not
that.

I recall having looked at the points of inconsistency (see 9.7.3.8)
and thought that we could probably create an option flag for our regex
engine that would address them, or at least get pretty close.  It'd
take some work though, especially for somebody who never looked at
that code before.

I'd be willing to blow off the locale discrepancies by continuing
to say that you have to use an appropriate locale, and I think the
business around varying newline representations is in the way-more-
trouble-than-its-worth department.  But we should at least match
the spec on available escape sequences and flag names.  It would
be a seriously bad idea, for example, if the default
does-dot-match-newline behavior wasn't per spec.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Vik Fearing
Date:
Subject: Standard REGEX functions
Next
From: Andrew Dunstan
Date:
Subject: Re: Error-safe user functions