Re: How to remove the current database and populate the database with new data? - Mailing list pgsql-general

From Craig Ringer
Subject Re: How to remove the current database and populate the database with new data?
Date
Msg-id 4C084C16.7070006@postnewspapers.com.au
Whole thread Raw
In response to Re: How to remove the current database and populate the database with new data?  ("Wang, Mary Y" <mary.y.wang@boeing.com>)
List pgsql-general
On 4/06/2010 7:26 AM, Wang, Mary Y wrote:
> I thought about DROP DATABASE, but wasn't sure if it would clean up EVERYTHING.

It won't remove your users and roles, or anything else that you see
reported in pg_dumpall --globals-only .

> I assume most of you would just do the DROP DATABASE for the scenario that I described.   Is that correct?

Yep. I essentially _never_ re-initdb, personally. For one thing, I often
have other databases in a cluster that I'd rather not lose, but it's
also generally unnecessary.

( I do frequently wish for the ability to create roles at the database
rather than cluster level, though, as it'd make cleaning the DB for
testing of schema creation scripts and the like considerably easier. Not
to mention backups. )

--
Craig Ringer

pgsql-general by date:

Previous
From:
Date:
Subject: Re: create index concurrently - duplicate index to reduce time without an index
Next
From: Richard Broersma
Date:
Subject: Requested addition to the todo list [was]: Re: Altering Domain Constraints on composite types