Re: UTF8MatchText

Поиск
Список
Период
Сортировка
Искать
От
Bruce Momjian
Тема
Re: UTF8MatchText
Дата
Msg-id
200704070423.l374NrX19805@momjian.us
Ответ на
Re: UTF8MatchText (Bruce Momjian)
Список
Дерево обсуждения
Re: UTF8MatchText Tom Lane <tgl@sss.pgh.pa.us>
Re: UTF8MatchText Andrew Dunstan <andrew@dunslane.net>
Bruce Momjian wrote:
> 
> I do not understand this patch.  You have defined two functions,
> UTF8MatchText() and UTF8MatchTextIC(), and the difference between them
> is that one calls CHAREQ and the other calls ICHAREQ, but just above
> those two functions you define the macros identically:
> 
> 	#define CHAREQ(p1, p2)    wchareq(p1, p2)
> 	#define ICHAREQ(p1, p2)   wchareq(p1, p2)
> 
> Why are there two functions?  Also, can't you use one function and just
> pass a boolean to indicate whether case it be ignored?

Sorry, typo:

Why are there two functions?  Also, can't you use one function and just
pass a boolean to indicate whether case should be ignored?
                                        ------

> 
> ---------------------------------------------------------------------------
> 
> ITAGAKI Takahiro wrote:
> > "Andrew - Supernews"  wrote:
> > 
> > >  ITAGAKI> I think all "safe ASCII-supersets" encodings are comparable
> > >  ITAGAKI> by bytes, not only UTF-8.
> > > 
> > > This is false, particularly for EUC.
> > 
> > Umm, I see. I updated the optimization to be used only for UTF8 case.
> > I also added some inlining hints that are useful on my machine (Pentium 4).
> > 
> > 
> > x1000 of LIKE '%foo% on 10000 rows tables [ms]
> >  encoding  | HEAD  |  P1   |  P2   |  P3  
> > -----------+-------+-------+-------+-------
> >  SQL_ASCII |  7094 |  7120 |  7063 |  7031
> >  LATIN1    |  7083 |  7130 |  7057 |  7031
> >  UTF8      | 17974 | 10859 | 10839 |  9682
> >  EUC_JP    | 17032 | 17557 | 17599 | 15240
> > 
> > - P1: UTF8MatchText()
> > - P2: P1 + __inline__ GenericMatchText()
> > - P3: P2 + __inline__ wchareq()
> >       (The attached patch is P3.)
> > 
> > Regards,
> > ---
> > ITAGAKI Takahiro
> > NTT Open Source Software Center
> > 
> 
> [ Attachment, skipping... ]
> 
> > 
> > ---------------------------(end of broadcast)---------------------------
> > TIP 7: You can help support the PostgreSQL project by donating at
> > 
> >                 http://www.postgresql.org/about/donate
> 
> -- 
>   Bruce Momjian            http://momjian.us
>   EnterpriseDB                               http://www.enterprisedb.com
> 
>   + If your life is a hard drive, Christ can be your backup. +
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 5: don't forget to increase your free space map settings

-- 
  Bruce Momjian            http://momjian.us
  EnterpriseDB                               http://www.enterprisedb.com

  + If your life is a hard drive, Christ can be your backup. +
В списке pgsql-patches по дате отправления
От: Bruce Momjian
Дата:
Сообщение: Re: Concurrent psql v4 [WIP]
От: Michael Fuhr
Дата:
FAQ