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

Re: postgres default database deleted!!

From: Hilda Raymond <hildaraymond(at)gmail(dot)com>
To: Gurjeet Singh <singh(dot)gurjeet(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-07 04:02:13
Message-ID: feeb312b1001062002j3c465b3ei81feb761d9083d53@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
the problem is psql doesn't work after deleting this db. Guessing
re-installing is the option.

On Wed, Jan 6, 2010 at 4:15 PM, Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>wrote:

> 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,
> --
> gurjeet.singh
> @ EnterpriseDB - The Enterprise Postgres Company
> http://www.enterprisedb.com
>
> singh(dot)gurjeet(at){ gmail | yahoo }.com
> Twitter/Skype: singh_gurjeet
>
> Mail sent from my BlackLaptop device
>



-- 
Hilda

In response to

Responses

pgsql-novice by date

Next:From: Tom LaneDate: 2010-01-07 04:22:43
Subject: Re: postgres default database deleted!!
Previous:From: Hilda RaymondDate: 2010-01-07 04:00:54
Subject: Re: postgres default database deleted!!

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