Re: Character set conversion
От
Tom Lane
Тема
Re: Character set conversion
Дата
Msg-id
12836.1216649800@sss.pgh.pa.us
Ответ на
Character set conversion (Bastiaan Olij)
Список
Дерево обсуждения
Character set conversion Bastiaan Olij <lists@basenlily.nl>
Re: Character set conversion Tom Lane <tgl@sss.pgh.pa.us>
Re: Character set conversion "Daniel T. Staal" <DStaal@usa.net>
Bastiaan Olij 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 по дате отправления