From: | Michael Enke <michael(dot)enke(at)wincor-nixdorf(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: pg_dumpall: pg_conversion table not saved |
Date: | 2008-05-08 00:35:43 |
Message-ID: | 48224ADF.8060307@wincor-nixdorf.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Tom Lane schrieb:
> Michael Enke <michael(dot)enke(at)wincor-nixdorf(dot)com> writes:
>> I updated pg_converion to set the condefault=false where I need it.
>
> Why are you needing to replace an existing default conversion?
> Do we have a bug in it?
No, not a bug. But I need CP852 encoding conversion. Maybe you can take a look at
http://archives.postgresql.org/pgsql-general/2008-05/msg00185.php
and give your comment.
Is the CREATE CONVERSION only for the case that there is a bug in existing default conversions? ;-)
>> pg_dumpall does NOT write that table out and therefore it is not possible to restore, this update get lost.
>
> pg_dump does not (and shouldn't) dump system-defined objects. It has
> no way to know that you modified the definition of such an object.
>
>> Why can not the "CREATE DEFAULT CONVERSION ..."
>> a) return with an error if there is another default conversion existing or
>
> AFAICS it does.
You can try with attached library:
CREATE FUNCTION utf82cp852(integer,integer,cstring,internal,integer)
RETURNS void AS '/tmp/libencodings' LANGUAGE 'C';
CREATE FUNCTION cp8522utf8(integer,integer,cstring,internal,integer)
RETURNS void AS '/tmp/libencodings' LANGUAGE 'C';
CREATE DEFAULT CONVERSION utf82cp852 FOR 'UNICODE' TO 'LATIN2' FROM utf82cp852;
CREATE DEFAULT CONVERSION cp8522utf8 FOR 'LATIN2' TO 'UNICODE' FROM cp8522utf8;
It doesn't complain but it also is not the encoding used now
since utf8_to_iso_8859_2 / iso_8859_2_utf8 has still condefault=true.
If I now set condefault to false, my conversion function is used.
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.
Attachment | Content-Type | Size |
---|---|---|
libencodings.so | application/x-sharedlib | 14.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bruce Momjian | 2008-05-08 01:49:51 | Re: Feature request/suggestion - CREATE SCHEMA LIKE |
Previous Message | Toby Chavez | 2008-05-08 00:14:46 | Re: Custom Base Type in C |