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

Re: postgres default database deleted!!

From: Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>
To: Hilda Raymond <hildaraymond(at)gmail(dot)com>
Cc: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: postgres default database deleted!!
Date: 2010-01-06 10:45:16
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
On Wed, Jan 6, 2010 at 1:02 PM, Hilda Raymond <hildaraymond(at)gmail(dot)com>wrote:

> Hi,
>  Im new to postgres and and as soon as I listed databases using the psql -l
> command, i accidentally deleted the postgres default database. Im not sure
> what to do. Appreciate any help Thank you.
You can simply recreate the DB like so:

create database postgres;

It will take everything from the template1 database and make a copy by the
name 'postgres'.

Best regards,
@ EnterpriseDB - The Enterprise Postgres Company

singh(dot)gurjeet(at){ gmail | yahoo }.com
Twitter/Skype: singh_gurjeet

Mail sent from my BlackLaptop device

In response to


pgsql-novice by date

Next:From: John J. UrbaniakDate: 2010-01-06 19:14:16
Subject: Error on Vacuum?
Previous:From: Pushpendra Singh ThakurDate: 2010-01-06 10:44:45
Subject: Re: postgres default database deleted!!

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