Re: Encoding names

From: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
To: lockhart(at)fourpalms(dot)org
Cc: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Encoding names
Date: 2001-02-21 14:13:24
Message-ID: Pine.LNX.3.96.1010221150929.22620M-100000@ara.zf.jcu.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 2001-02-21 15:03:04 Re: beta5 ...
Previous Message The Hermit Hacker 2001-02-21 13:45:12 Re: beta5 ...