Postgres, testing and maybe spurious database DROPpings?

Folks,

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.

Thoughts?

-DJCP
Software Engineer

I just don’t think in practice people really care about the test users
privileges since it doesn’t run against critical databases (like
production).

On Feb 6, 7:38 am, Daniel Collis-puro <rails-mailing-l…@andreas-