Обсуждение: Re: [HACKERS] problem with casts dump/restore

Поиск
Список
Период
Сортировка

Re: [HACKERS] problem with casts dump/restore

От
"John Hansen"
Дата:
I have not had time to install RC4 / RC5 yet, but have anyone tried this:

Createdb -Eunicode test
Psql test -c 'create table foo (bar text);

Then connect using libpq, and in your software application (C) pqexec something like:

'set client_encoding=ascii'
Insert into foo(bar) values('some text with accented characters');



Pg_dump was never able to dump that in a format that it was possible to restore with psql.
I usually had to manually edit the dump, and issue set client_encoding=ascii; set client_encoding=unicode; before and
afterthe entries that was inserted with ascii encoding. 

We're talking a table with millions of entries where only a few had been inserted using ascii encoding.

If someone could test it before release it would be good, unfortunately I will not have the time to do so myself.

Kind Regards,

John