Skip site navigation (1) Skip section navigation (2)

Re: BUG #3760: Comment on restore database

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, Malcus Imhof <malcus(at)terra(dot)com(dot)br>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3760: Comment on restore database
Date: 2007-11-19 20:02:24
Message-ID: 1195502544.4217.116.camel@ebony.site (view raw or flat)
Thread:
Lists: pgsql-bugs
On Mon, 2007-11-19 at 14:27 -0500, Bruce Momjian wrote:
> Alvaro Herrera wrote:
> > Bruce Momjian wrote:
> > > Malcus Imhof wrote:
> > 
> > > Yea, the dump thinks it is going into the same database.  I don't see
> > > any way of fixing that.  We don't allow functions for the object name. 
> > > If we did we could use current_database().  Fortunately I think it is
> > > the only place where the database name is hardcoded in the dump.
> > 
> > The easiest would be to add new syntax,
> > COMMENT ON CURRENT DATABASE IS 'foo'
> 
> Yea, probably.  I have added that as possible syntax to the TODO list.

Can we implement something for 8.3 please?

Suggested syntax even simpler

	COMMENT ON DATABASE IS 'text';

to set the comment on the current database.

Reason to do this now: Perf Tips have been changed for 8.3 to recommend
using --single-transaction when restoring pg_dumps, because of fast COPY
enhancement. Allowing this to cause an error will prevent the whole dump
from restoring. That will force people to find the cause of the error,
for which there is no hint, edit the file and resubmit.

Fairly simple to allow working syntax, and useful too.

-- 
  Simon Riggs
  2ndQuadrant  http://www.2ndQuadrant.com


In response to

Responses

pgsql-bugs by date

Next:From: Bruce MomjianDate: 2007-11-19 21:29:47
Subject: Re: [BUGS] BUG #3761: Problems with to_char(timestamp) and milliseconds
Previous:From: Hussain Jawad-FXRM43Date: 2007-11-19 19:47:48
Subject: Re: Start up error

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group