Re: [HACKERS] [ADMIN] problems with pg_restore

2003-07-19 Thread Kuhn, Dylan K (4520500D)
> Given the current implementation, it seems like there are > three possible > behaviors for COMMENT ON DATABASE when the database name > isn't the same > as the current database: > > 1. Raise error (what we're doing now). Simple but breaks dump scripts >for the restore-into-different-DB s

Re: [HACKERS] [ADMIN] problems with pg_restore

2003-07-19 Thread Andrew Biagioni
Tom Lane wrote: Alvaro Herrera <[EMAIL PROTECTED]> writes: On Tue, Jul 15, 2003 at 04:03:13PM -0400, Tom Lane wrote: Given the current implementation, it seems like there are three possible behaviors for COMMENT ON DATABASE when the database name isn't the same as t

Re: [HACKERS] [ADMIN] problems with pg_restore

2003-07-16 Thread Tom Lane
Alvaro Herrera <[EMAIL PROTECTED]> writes: > On Tue, Jul 15, 2003 at 04:03:13PM -0400, Tom Lane wrote: >> Given the current implementation, it seems like there are three possible >> behaviors for COMMENT ON DATABASE when the database name isn't the same >> as the current database: > There's a four

Re: [HACKERS] [ADMIN] problems with pg_restore

2003-07-15 Thread Alvaro Herrera
On Tue, Jul 15, 2003 at 04:03:13PM -0400, Tom Lane wrote: > Given the current implementation, it seems like there are three possible > behaviors for COMMENT ON DATABASE when the database name isn't the same > as the current database: There's a fourth possibility: ignore the command and issue a W

Re: [HACKERS] [ADMIN] problems with pg_restore

2003-07-15 Thread Rod Taylor
> 3. Ignore the specified DB name, store the comment as the description >of the current DB; possibly give a warning saying we're doing so. >This would allow correct restoration of dumps into different DBs, >but I think people would find it awfully surprising :-( I like this one for 7.4

Re: [HACKERS] [ADMIN] problems with pg_restore

2003-07-15 Thread Tom Lane
Rod Taylor <[EMAIL PROTECTED]> writes: >> 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 war

Re: [HACKERS] [ADMIN] problems with pg_restore

2003-07-15 Thread Rod Taylor
> 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

Re: [HACKERS] [ADMIN] problems with pg_restore

2003-07-15 Thread Tom Lane
"Kuhn, Dylan K (4520500D)" <[EMAIL PROTECTED]> 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