Search Postgresql Archives

Re: How to remove the current database and populate the database with new data?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux