Re: pg_restore usage

From: tfo(at)alumni(dot)brown(dot)edu (Thomas F(dot) O'Connell)
To: pgsql-admin(at)postgresql(dot)org
Subject: Re: pg_restore usage
Date: 2004-06-28 19:55:05
Message-ID: 80c38bb1.0406281155.470ef80b@posting.google.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

So these two statements seem to be somewhat contradictory.

What's the point of -C if not to create the database named in -d?

And why does -C -d template1 work but not -C -d <mypgsql>?

-tfo

tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane) wrote in message news:<11767(dot)1088346148(at)sss(dot)pgh(dot)pa(dot)us>...
> Whatever database you name in -d has to already exist, because that's
> where pg_restore will initially connect. -C means to issue a CREATE
> DATABASE command and then reconnect to the new db.
>
> In other words, try "-C -d template1".

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Jeff Stout 2004-06-28 21:10:12 pg_ctl question
Previous Message Bruno Wolff III 2004-06-28 18:25:13 Re: Recover from a media failure