Re: 7.2 Upgrade problems: Cannot restore from pg_dumpall - Mailing list pgsql-general

From Jeff Davis
Subject Re: 7.2 Upgrade problems: Cannot restore from pg_dumpall
Date
Msg-id 200202080718.XAA25746@mail.ucsd.edu
Whole thread Raw
In response to 7.2 Upgrade problems: Cannot restore from pg_dumpall  (Chris Lee <Chrislee@centurycity.com.hk>)
List pgsql-general
> CREATE DATABASE
> psql:/tmp/pg_dump.bak:473: \connect: FATAL 1:  Database "chinese" does not
> exist in the system catalog.
> copying template1 to template0... ok
>
> Here is the content of pg_dump.bak
>
> 471 \connect template1 postgres
> 472 CREATE DATABASE "Chinese" WITH TEMPLATE = template0 ENCODING =
> 'EUC_TW'; 473 \connect Chinese postgres

It looks like you're running into a problem with case sensitivity. I guess it
might also be a problem with pg_dump, since you used it directly. I think the
solution is to use quotation marks around the word "Chinese" in the connect
statement.
\connect Chinese postgres => \connect "Chinese" postgres

Hope it helps. I wonder what's up with pg_dump though... It seems like a bad
idea to use any capital letters for any identifiers in postgresql because
postgresql handles them so awkwardly.

Regards,
    Jeff

pgsql-general by date:

Previous
From: Chris Lee
Date:
Subject: 7.2 Upgrade problems: Cannot restore from pg_dumpall
Next
From: "Arsalan Zaidi"
Date:
Subject: Re: Build problems with 7.2