molereddy
molereddy

Reputation: 17

Dropped the default postgres database in Postgresql server

I did not know what the database did and I deleted it without realizing that now I wouldn't be able to run psql again. How do I get thngs back to normal again?

Upvotes: 1

Views: 1406

Answers (1)

user330315
user330315

Reputation:

The postgres database isn't really needed.

But you can re-create it using:

psql -U postgres -d template1
psql (13.1)

postgres=# create database postgres;

The -d template1 tells psql to connect to the template1 database.

Upvotes: 3

Related Questions