Re: text_position worst case runtime - Mailing list pgsql-hackers

From Tom Lane
Subject Re: text_position worst case runtime
Date
Msg-id 4512.1148077116@sss.pgh.pa.us
Whole thread Raw
In response to Re: text_position worst case runtime  (Hannu Krosing <hannu@skype.net>)
Responses Re: text_position worst case runtime
Re: text_position worst case runtime
List pgsql-hackers
Hannu Krosing <hannu@skype.net> writes:
> I guess our regex implementation already uses boyer-moore or similar.
> Why not just expose the match position of substring('text' in 'regex')
> using some function, called  match_position(int searched_text, int
> regex, int matchnum) ?

If it did that might be a nice solution, but I'm not sure that it does
use B-M ... I can't find either "Boyer" or "Moore" in its source code.

There's no particular reason to suppose offhand that a regex engine
would be faster than the naive code for fixed patterns.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Compression and on-disk sorting
Next
From: Hannu Krosing
Date:
Subject: Re: Compression and on-disk sorting