Re: Encoding names - Mailing list pgsql-hackers

From Karel Zak
Subject Re: Encoding names
Date
Msg-id Pine.LNX.3.96.1010221150929.22620M-100000@ara.zf.jcu.cz
Whole thread Raw
In response to Re: Encoding names  (Thomas Lockhart <lockhart@alumni.caltech.edu>)
Responses Re: Encoding names  (Tatsuo Ishii <t-ishii@sra.co.jp>)
List pgsql-hackers
On Wed, 21 Feb 2001, Thomas Lockhart wrote:

> >  You not must change current names, you can add to pg_conv_tbl[] new lines
> > with names synonym for already existing encoding...
> >  {LATIN1, "LATIN1",     0, latin12mic, mic2latin1, 0, 0},
> >  {LATIN1, "ISO-8859-1", 0, latin12mic, mic2latin1, 0, 0},
> >  And if you order this table by alphabet and in pg_char_to_encoding()
> > you use Knuth's binary search intead current seq. scannig by for() every
> > thing will faster and more nice. It's easy.
> 
> As you probably know, there is already a binary search algorithm coded
> up for the date/time string lookups in utils/adt/datetime.c. Since that
> lookup caches the last value (which could be done here too) most lookups
> are immediate.
> 
> Are you proposing to make a change Karel, or just encouraging others? :)
> 
No problem for me. Do you want patch with this to tommorow breakfast?
IMHO it's acceptable for current 7.1 too, it's really small change.
Or do it Tatsuo?
        Karel



pgsql-hackers by date:

Previous
From: The Hermit Hacker
Date:
Subject: Re: beta5 ...
Next
From: Tom Lane
Date:
Subject: Re: beta5 ...