Daniel Shahaf <d...@daniel.shahaf.name> writes: > Philip Martin wrote on Fri, Oct 29, 2010 at 08:58:02 +0100: >> Can we treat the string as a bytes and just increment and carry? > > No, this might invalidate the UTF-8 sequence. If a character spans > multiple bytes, then those bytes have header bits of the form /^1+0/ > (in regex), so incrementing the byte blindly will eventually invalidate > the byte sequence by turning the 0 into a 1.
It turns out we don't need a general "next character", just the next character after '/', i.e. '0'. Thus local_relpath LIKE 'foo/bar/%' ESCAPE '%' becomes local_relpath > 'foo/bar/' AND local_relpath < 'foo/bar0' -- Philip