This project is archived and is in readonly mode.
db:test:prepare fails on postgres < 8.2
-
ian
Here is a patch that checks the version of postgres and uses the correct syntax
-
Jeremy Kemper
- Milestone set to 2.1.1
- State changed from new to open
- Assigned user set to Jeremy Kemper
-
Markus Melcher
Looks good to me, apart from the fact that now PG 8.1 signals an error when the database does not exist. So I wrapped the whole thing in a begin/rescue clause to take care of that.
Thanks a lot for the patch - I didn't know how to check the DB version.
-
Repository
- State changed from open to resolved
(from [965848ec61529df53f137bf877fb36abd786da8c]) Only use DROP ... IF EXISTS for PostgreSQL 8.2 or later. [#400 state:resolved]
