Re: How to disable encoding validation during database restore - Mailing list pgsql-hackers

From Tatsuo Ishii
Subject Re: How to disable encoding validation during database restore
Date
Msg-id 20020821.150612.44988258.t-ishii@sra.co.jp
Whole thread Raw
List pgsql-hackers
> Hi Tatsuo Ishii :
> 
> Thank you very much for your reply. Somehow I managed to restore the data by
> creating by database in  SQL_ASCII encoding. Then I changed the encoding of
> my database into EUC_CN thru "update pg_database set encoding=2". But the
> same problem happened in "vacuum verbose analyze". I went thru the changelog
> and found out that you have add the multibyte validation feature from
> release 7.2 on. Looks like the only way to get around is to patch the
> source.
> 
> But I would like to suggest that this feature should be made configurable.
> You know encoding is a such a mess in the Chinese language,  the popular
> Chinese input methods actually allow the input of any Chinese character from
> different encodings(e.g., GB2312/GBK, big5), it is difficult to make sure
> that the user always input valid  characters unless you validate the insert
> and update clause.

But the encoding validation is made for such cases. It will prevent
the database from INSERT/UPDATE with wrong encoding data. If you
really want to allow input any GB2312/GBK, big5 etc. encoded data to
the database, why don't you simply use SQL_ASCII or some other single
byte encodings? If you mix up GB2312/GBK, big5 in a database you could
not perform sort or any other database operation properly anyway.
--
Tatsuo Ishii


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgstattuple change using SRF
Next
From: Gavin Sherry
Date:
Subject: Re: @(#)Mordred Labs advisory 0x0003: Buffer overflow in