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