Re: Character set conversion

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Character set conversion
Дата
Msg-id 12836.1216649800@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Character set conversion  (Bastiaan Olij <lists@basenlily.nl>)
Ответы Re: Character set conversion
Список pgsql-novice
Bastiaan Olij <lists@basenlily.nl> writes:
> I read in the documentation about the 'Create conversion' command
> writing a function to do the conversion job. Is this the best way
> forward or are there better ways to attempt this? Is there any sample
> code available for implementing such a conversion? I don't want to
> reinvent the wheel here...

Look into the PG source code under
src/backend/utils/mb/conversion_procs.

While an add-on conversion procedure isn't too hard, I don't think
there's any way to define a whole new encoding without modifying the
source code --- the encodings are listed in some hard-coded tables
in the C code rather than being defined by a system catalog.  It
wouldn't be too hard if you don't mind running a custom Postgres
build; but if you do, then the best answer might be to cannibalize
one of the existing encoding names and just replace its conversion
procedures.

            regards, tom lane

В списке pgsql-novice по дате отправления:

Предыдущее
От: Bastiaan Olij
Дата:
Сообщение: Character set conversion
Следующее
От: "Wright, George"
Дата:
Сообщение: libpq question