Tom Lane wrote:
Wait a second ... I just thought of a counterexample that destroys the entire concept. Consider the pattern 'A__B', which clearly is supposed to match strings of four *characters*. With the proposed patch in place, it would match strings of four *bytes*. Which is not the correct behavior.
From what I can see the code is quite careful about when it calls NextByte vs NextChar, and after _ it calls NextChar.
So I'll test for this, but I think it's safe. cheers andrew ---------------------------(end of broadcast)--------------------------- TIP 3: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq