pg_dump and restore -- solved and urgent warning
От | Andreas Tille |
---|---|
Тема | pg_dump and restore -- solved and urgent warning |
Дата | |
Msg-id | Pine.LNX.4.21.0008111456020.25058-100000@wr-linux02.rki.de обсуждение исходный текст |
Ответ на | Re: pg_dump and restore (Andreas Tille <tillea@rki.de>) |
Список | pgsql-general |
On Fri, 11 Aug 2000, I wrote: > after solving the timestamp issue I found out further problems with > the dump from the database. I found out that *some* fields with > German Umlauts make psql fail with *some* records. It is really strange > that *not all* records fail but just a *few* :-(((. Enclosing the > strings in '' in the dump file helped psql and it could read the > records fine, but now they are included with additional '' :-(. > Well, after removing the '' with Access pg_dump cut the remainder > of the record so that the columns behind the string in question remain > empty. > > What could cause this very strange trouble after having a correct > database pg_dumped??? It took me a day to solve the probelm, but finaly I had success: I found out a real strange rule: pg_dump doesn't continue a recored if there is a data field which has an Umlaut in the last character or the character before the last, i.e. for Strings of the Form: *[äüö] and *[äüö]. I found it out because I fiddled around with the quoting '', which made an extra character after the string and so some strings were changed to *[äüö].' and worked, but those with *[äüö]' did not work. Appending any character to the end of the later ones let pg_dump do a good job for all strings. What was the reason. Originally I used "UNICODE" encoding when I installed the database, because it was the default of the Debian package. I removed the PostgreSQL package and switched to LATIN1 and viola all went OK. So there is the warning about UNICODE. May be it is a bloody beginner fault and it is half clear for me, why this happened (UNICODE takes 16 bytes and does perhaps some strange interpretation of those strings), but in my opinion something is wrong in the `pg_dump | psql` pipe and should be work in any case, so I would consider it more as a bug than a feature. Kind regards Andreas.
В списке pgsql-general по дате отправления: