| From: | Marco Colombo <pgsql(at)esiway(dot)net> |
|---|---|
| To: | becauseimjeff(at)yahoo(dot)com |
| Cc: | Postgres general mailing list <pgsql-general(at)postgresql(dot)org> |
| Subject: | Re: Frustrated...pg_dump/restore |
| Date: | 2008-10-10 10:43:05 |
| Message-ID: | 48EF31B9.4050803@esiway.net |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Sebastian Pawłowski | 2008-10-10 10:58:35 | flood in logs |
| Previous Message | Grzegorz Jaśkiewicz | 2008-10-10 10:16:20 | Re: how to get unique identifier for a client |