Skip site navigation (1) Skip section navigation (2)

Re: UTF8MatchText

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: ITAGAKI Takahiro <itagaki(dot)takahiro(at)oss(dot)ntt(dot)co(dot)jp>, Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: UTF8MatchText
Date: 2007-05-17 23:45:50
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackerspgsql-patches
Andrew Dunstan <andrew(at)dunslane(dot)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

In response to

pgsql-hackers by date

Next:From: Tom LaneDate: 2007-05-17 23:48:27
Subject: Re: interval / interval -> double operator
Previous:From: Bruce MomjianDate: 2007-05-17 23:17:42
Subject: Re: What is happening on buildfarm member baiji?

pgsql-patches by date

Next:From: Neil ConwayDate: 2007-05-18 00:36:28
Previous:From: Bruce MomjianDate: 2007-05-17 22:47:50
Subject: Re: Automatic adjustment of bgwriter_lru_maxpages

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group