Обсуждение: postgres default database deleted!!

Поиск
Список
Период
Сортировка

postgres default database deleted!!

От
Hilda Raymond
Дата:



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.

--
Hilda




--
Hilda

Re: postgres default database deleted!!

От
Gurjeet Singh
Дата:
On Wed, Jan 6, 2010 at 1:02 PM, Hilda Raymond <hildaraymond@gmail.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.gurjeet@{ gmail | yahoo }.com
Twitter/Skype: singh_gurjeet

Mail sent from my BlackLaptop device

Re: postgres default database deleted!!

От
Pushpendra Singh Thakur
Дата:
if you have deleted the database named "postgres", no need to worry, it was empty.

2010/1/6 Hilda Raymond <hildaraymond@gmail.com>



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.

--
Hilda




--
Hilda




--
Pushpendra Singh Thakur

COREEXPERTS Technologies Private Limited
Business Process Automation & IT Support Services
http://www.corexprts.com
Phone - 91-761-4070036
Fax - 91-761-4010530
SMS - 91-799-66554

Re: postgres default database deleted!!

От
Hilda Raymond
Дата:
Thank you :-)

On Wed, Jan 6, 2010 at 4:14 PM, Pushpendra Singh Thakur <thakur@corexprts.com> wrote:
if you have deleted the database named "postgres", no need to worry, it was empty.

2010/1/6 Hilda Raymond <hildaraymond@gmail.com>




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.

--
Hilda




--
Hilda




--
Pushpendra Singh Thakur

COREEXPERTS Technologies Private Limited
Business Process Automation & IT Support Services
http://www.corexprts.com
Phone - 91-761-4070036
Fax - 91-761-4010530
SMS - 91-799-66554



--
Hilda

Re: postgres default database deleted!!

От
Hilda Raymond
Дата:
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.gurjeet@gmail.com> wrote:
On Wed, Jan 6, 2010 at 1:02 PM, Hilda Raymond <hildaraymond@gmail.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.gurjeet@{ gmail | yahoo }.com
Twitter/Skype: singh_gurjeet

Mail sent from my BlackLaptop device



--
Hilda

Re: postgres default database deleted!!

От
Tom Lane
Дата:
Hilda Raymond <hildaraymond@gmail.com> writes:
> the problem is psql doesn't work after deleting this db. Guessing
> re-installing is the option.

Sure it does, just connect to some other database.

            regards, tom lane