Re: Regex back-reference semantics and performance

2021-03-01 Thread Tom Lane
"Joel Jacobson" writes: > On Mon, Mar 1, 2021, at 01:53, Tom Lane wrote: >> 0001-fix-backref-semantics.patch >> 0002-backref-performance-hack.patch > I've successfully tested both patches. Again, thanks for testing! > On HEAD the trouble-query took forever, I cancelled it after 23 minutes. Yea

Re: Regex back-reference semantics and performance

2021-03-01 Thread Joel Jacobson
On Mon, Mar 1, 2021, at 01:53, Tom Lane wrote: >0001-fix-backref-semantics.patch >0002-backref-performance-hack.patch I've successfully tested both patches. On HEAD the trouble-query took forever, I cancelled it after 23 minutes. HEAD (f5a5773a9dc4185414fe538525e20d8512c2ba35): SELECT regexp_mat

Regex back-reference semantics and performance

2021-02-28 Thread Tom Lane
I noticed that some of the slowest cases in Joel's regex test corpus had issues with back-reference matching, and along the way to fixing that discovered what seems to me to be a bug in the engine's handling of back-references. To wit, what should happen if a back-reference is to a subexpression t