Re: How to restore "postgres" database?

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: How to restore "postgres" database?
Date: 2010-10-01 15:09:23
Message-ID: 4CA5F9A3.8050100@postnewspapers.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 10/01/2010 10:40 PM, Alexander Farber wrote:
> Ouch! I've loaded my backup while being connected
> to the wrong database - to the dafeult "postgres" database.
>
> Is there a way to restore it?

Sure. Just drop it and re-create it. The "postgres" database is just a
convenience, and is typically empty.

You'll need to connect to the template1 database; you can't drop the
postgres database while you're connected to it.

--
Craig Ringer

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Alexander Farber 2010-10-01 15:11:47 Re: Copying a column into a temp. table
Previous Message Gurjeet Singh 2010-10-01 14:59:17 Re: Copying a column into a temp. table