Re: UTF8MatchText - Mailing list pgsql-patches

From Tom Lane
Subject Re: UTF8MatchText
Date
Msg-id 15910.1179445550@sss.pgh.pa.us
Whole thread Raw
In response to Re: UTF8MatchText  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-patches
Andrew Dunstan <andrew@dunslane.net> writes:
> Is it legal to follow escape by anything other than _ % or escape?

Certainly, but once you've compared the first byte you can handle any
remaining bytes via the main loop.  And in fact the code is already
depending on being able to do that --- the use of CHAREQ rather than
BYTEEQ is just wasted cycles.

> One more thing - I'm thinking of rolling up the bytea matching routines
> as well as the text routines to eliminate all the duplication of logic.

+1, I think, but I wonder why we had the duplication in the first
place.  Is there any likelihood that bytea's semantics should diverge
from the text case?

            regards, tom lane

pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Automatic adjustment of bgwriter_lru_maxpages
Next
From: Neil Conway
Date:
Subject: Re: CREATE TABLE LIKE INCLUDING INDEXES support