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.