Re: Encoding names
От | Thomas Lockhart |
---|---|
Тема | Re: Encoding names |
Дата | |
Msg-id | 3A93C4E5.5A052DEF@alumni.caltech.edu обсуждение исходный текст |
Ответ на | Re: Encoding names (Karel Zak <zakkr@zf.jcu.cz>) |
Ответы |
Re: Encoding names
|
Список | 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
В списке pgsql-hackers по дате отправления: