Re: regex_fixed_prefix() is still a few bricks shy of a load - Mailing list pgsql-hackers

From Robert Haas
Subject Re: regex_fixed_prefix() is still a few bricks shy of a load
Date
Msg-id E9AC540E-516E-49F8-B07C-379E100F3B48@gmail.com
Whole thread Raw
In response to regex_fixed_prefix() is still a few bricks shy of a load  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: regex_fixed_prefix() is still a few bricks shy of a load  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Jul 7, 2012, at 1:46 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 3. Try another approach entirely.  The idea that I've got in mind here
> is to compile the regex using the regex library and then look at the
> compiled NFA representation to see if there must be a fixed prefix.
> I would not have risked this before this year, but after last winter's
> expeditions into the darkest corners of the regex library I feel
> competent to do it, and some quick study suggests that it might not take
> very much code to produce something that is significantly brighter than
> what we have now.  However, there are a couple of arguments against
> pursuing this path:

I think this is clearly the best way forward, probably even in the back branches.  It's true that the wchar to mb
conversionis largely untested, but it's also pretty simple code.  Sure, it could have bugs, but so could whatever
work-aroundyou cobble together to avoid back-patching it.  And it's not like we'll break anything else, either: the
codewill only be used in the case that is buggy right now anyway. 

...Robert

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Schema version management
Next
From: Tom Lane
Date:
Subject: Re: Schema version management