Re: regexp character class locale awareness patch - Mailing list pgsql-hackers

From Manuel Sugawara
Subject Re: regexp character class locale awareness patch
Date
Msg-id m38z7o1csx.fsf@dep4.fciencias.unam.mx
Whole thread Raw
In response to Re: regexp character class locale awareness patch  (Tatsuo Ishii <t-ishii@sra.co.jp>)
List pgsql-hackers
Tatsuo Ishii <t-ishii@sra.co.jp> writes:

> I don't think character classes are applicable for most mutibyte
> encodings. Maybe only the exeception is Unicode?

Maybe, and is the only one I need ;-)

> 
> > Peter Eisentraut <peter_e@gmx.net> writes:
> > >
> > > Basically, you manually preprocess the patch to include the
> > > USE_LOCALE branch and remove the not USE_LOCALE branch.
> > 
> > Yeah, that should work. You may also remove include/regex/cclass.h
> > since it will not be used any more.
> 
> But I don't like cclass_init() routine runs every time when reg_comp
> called.

Actually it is called once per backend and only if it uses the regular
expression engine.

> In my understanding the result of cclass_init() is always
> same. 

Yes, if localization does not change. Karel once talked about the
possibility of being able to have different locales in the same
DB.

> What about running cclass_init() in postmaster, not postgres? Or
> even better in initdb time?

It might be, but ... I think that it would be nice if we leave the
door open to the possibility of having mixed locale configurations,
across data bases or even across columns of the same table.

Regards,
Manuel.


pgsql-hackers by date:

Previous
From: Gavin Sherry
Date:
Subject: Re: Importing Large Amounts of Data
Next
From: Tom Lane
Date:
Subject: Re: Operators and schemas