Re: Frustrated...pg_dump/restore - Mailing list pgsql-general

From Marco Colombo
Subject Re: Frustrated...pg_dump/restore
Date
Msg-id 48EF31B9.4050803@esiway.net
Whole thread Raw
In response to Re: Frustrated...pg_dump/restore  (Jeff Amiel <becauseimjeff@yahoo.com>)
List pgsql-general
Jeff Amiel wrote:

> Ahhh....
> *looks at encoding*
>
> Well..they are both the same...BUT...they are set to
> ENCODING = 'SQL_ASCII';
>
> That explains a lot....they should probably be set to Unicode UTF8....
> Duh!!!!
>
> Any way to change encoding without dumping/restoring database?

You can change client encoding any time with the PGCLIENTENCODING
environment variable. AFAIK, there's no way to change the encoding of
a database, it's set at creation time.

But I think SQL_ASCII makes it less picky about the input, so that
might not be the source of your problem.

You should look at the errors you see _before_ the "invalid command \N".
I suspect a slight schema mismatch... that could cause a COPY to fail,
while an INSERT might still work.

How did you create the 'schema-only database'? With a
pg_dump --schema-only or with a different SQL script?

You may also try and pg_dump --schema-only both databases and diff
the output.

.TM.

pgsql-general by date:

Previous
From: Sebastian Pawłowski
Date:
Subject: flood in logs
Next
From: Jeng Yu
Date:
Subject: Update Query Problem