Re: Encoding names

From: Thomas Lockhart <lockhart(at)alumni(dot)caltech(dot)edu>
To: Karel Zak <zakkr(at)zf(dot)jcu(dot)cz>
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 13:38:45
Message-ID: 3A93C4E5.5A052DEF@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> 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? :)

- Thomas

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message The Hermit Hacker 2001-02-21 13:45:12 Re: beta5 ...
Previous Message Robert Schrem 2001-02-21 11:34:04 Re: Re: floating point representation