Search Postgresql Archives

CREATE CHARSET would be nice feature

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,
I had to get data out of postgresql in CP852 encoding (internally stored in UNICODE).
So I wrote my own encoding function and used CREATE DEFAULT ENCODING.
The problem with this is:
I can only use character set names which are known internally.
So I "misused" the LATIN2:

update pg_conversion set condefault=false where conname='iso_8859_2_to_utf8';
update pg_conversion set condefault=false where conname='utf8_to_iso_8859_2';
CREATE DEFAULT CONVERSION utf82cp852 FOR 'UNICODE' TO 'LATIN2' FROM utf82cp852;
CREATE DEFAULT CONVERSION cp8522utf8 FOR 'LATIN2' TO 'UNICODE' FROM cp8522utf8;

I do not understand why there is a CREATE CONVERSION without a CREATE CHARSET
since everybody using it has to misuse existing charset names.

So, a nice feature would be to let user create their own character set names.
In this case I could write:
CREATE CHARSET CP852;
CREATE DEFAULT CONVERSION utf82cp852 FOR 'UNICODE' TO 'CP852' FROM utf82cp852;
CREATE DEFAULT CONVERSION cp8522utf8 FOR 'CP852' TO 'UNICODE' FROM cp8522utf8;
and I would not need to update the pg_conversion table and I would be able
to use LATIN2 and CP852 in parallel.

Are there actually plans for this?

If this is not the case, is there a table which maps values for
pg_conversion.conforencoding / pg_conversion.contoencoding
to the names given as source_encoding/dest_encoding and where I can add one row?

Regards,
Michael

--
Wincor Nixdorf International GmbH
Sitz der Gesellschaft: Paderborn
Registergericht Paderborn HRB 3507
Geschäftsführer: Eckard Heidloff (Vorsitzender), Stefan Auerbach, Dr. Jürgen Wunram
Vorsitzender des Aufsichtsrats: Karl-Heinz Stiller
Steuernummer: 339/5884/0020 - Ust-ID Nr.: DE812927716 - WEEE-Reg.-Nr. DE44477193

Diese E-Mail enthält vertrauliche Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese E-Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser E-Mail ist nicht gestattet.

This e-mail may contain confidential information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden.



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux