Forum: Ruby on Rails Postgres, testing and maybe spurious database DROPpings?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
01725a108ae624cfeaa5f5e2a91af124?d=identicon&s=25 Daniel Collis-puro (djcp)
on 2007-02-06 16:38

I don't like that I have to grant CREATEDB rights to the test user to
get testing working smoothly with Postgres.

What is the philosophical reason that Rails wants to drop and recreate
databases during the testing? It would seem to me that "pg_dump -c" (the
"clean" dump option, similar to mysqldump's --add-drop-tables ) would
suffice when you're using SQL format schema dumps.

Another problem with dropping databases is that procedural languages are
lost unless they are loaded into template1.

The workaround is to just install procedural languages into template1
and grant CREATEDB rights to the test user, but it would feel cleaner to
leave database creation up to the postgres admin user to me. "Principle
of least privilege" and all that.


Software Engineer
Ae97ad0da5c7887be291561eb1720093?d=identicon&s=25 Alex Soto (asoto)
on 2007-02-07 18:54
(Received via mailing list)
I just don't think in practice people really care about the test users
privileges since it doesn't run against critical databases (like

On Feb 6, 7:38 am, Daniel Collis-puro <rails-mailing-l...@andreas-
This topic is locked and can not be replied to.