Re: problems with pg_restore - Mailing list pgsql-admin

From Tom Lane
Subject Re: problems with pg_restore
Date
Msg-id 23211.1058286389@sss.pgh.pa.us
Whole thread Raw
In response to problems with pg_restore  ("Kuhn, Dylan K (4520500D)" <Dylan.Kuhn@navy.mil>)
Responses Re: problems with pg_restore  (Rod Taylor <rbt@rbt.ca>)
List pgsql-admin
"Kuhn, Dylan K (4520500D)" <Dylan.Kuhn@navy.mil> writes:
> [ tries to restore a dump into a database with a different name ]
> pg_restore: [archiver (db)] could not execute query: ERROR: Database commen=
> ts may only be applied to the current database

> I'm not sure how to get around this one.  Can an archived database with com=
> ments be restored to a database with a different name?

Hm.  Evidently not :-(.  The COMMENT ON DATABASE facility is a bit bogus
anyway (since there's no way to make the comments visible across
databases).  You might be best advised not to use it.

Hackers: this seems like an extremely bad side-effect of what we thought
was a simple addition of a helpful check.  I am thinking we should
either remove the check again, or downgrade it to a WARNING (though I'm
not quite sure how to phrase the warning ...).  Any thoughts?

            regards, tom lane

pgsql-admin by date:

Previous
From: "Kuhn, Dylan K (4520500D)"
Date:
Subject: problems with pg_restore
Next
From: "Kuhn, Dylan K (4520500D)"
Date:
Subject: Re: problems with pg_restore