Re: Minor regexp bug - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: Minor regexp bug
Date
Msg-id CAKFQuwZv-+z6CMrSk501xSQ+Uh8sifhuKzcgB=72M2doC-m0OQ@mail.gmail.com
Whole thread Raw
In response to Minor regexp bug  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, Nov 6, 2015 at 7:32 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
What I'm wondering about is whether to back-patch this.  It's possible
that people have written patterns like this and not realized that they
aren't doing quite what's expected.  Getting a failure instead might not
be desirable in a minor release.  On the other hand, wrong answers are
wrong answers.

​I'd vote to back-patch this.  The unscientific reason on my end is that I suspect very few patterns in the wild would be affected and furthermore any using such patterns is likely to be in a position to change it match the existing behavior by replace the "(\1)" with the corresponding "(\w)" as you used in you example.  We should probably suggest just that in the release notes.  It is not a strongly held position and my first reaction was that introducing an error should be avoided.  But regular expressions are tricky enough to get right when the engine does what you tell it...

David J.

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Bitmap index scans use of filters on available columns
Next
From: Robert Haas
Date:
Subject: Re: ALTER INDEX...SET tab completion