pg_dump and restore -- solved and urgent warning

From: Andreas Tille <tillea(at)rki(dot)de>
To: PostgreSQL General <pgsql-general(at)postgresql(dot)org>
Subject: pg_dump and restore -- solved and urgent warning
Date: 2000-08-11 13:07:46
Message-ID: Pine.LNX.4.21.0008111456020.25058-100000@wr-linux02.rki.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Andreas Tille 2000-08-11 13:33:49 Stored procedures - how to start
Previous Message Radoslaw Stachowiak 2000-08-11 09:39:51 Re: Date storage class type