Right now I'm working on implementing prepared statements in Ruby on
Rails, but the PostgreSQL unit tests fail, even before I've written
any code, because the PostgreSQL adapter has many problems. Can
someone please review the patch at http://dev.rubyonrails.org/ticket/8049
? This fixes a lot of PostgreSQL problems. It has been open for 2
months but no sign of being reviewed or accepted.
For me, Postgres only fails on schema creation/ownership tests (test_schema_postgres.rb) because the user I’m testing with doesn’t have superuser permissions (but, IMO, it has all necessary permissions on the test database). The setup (CREATE SCHEMA statement) fails, so naturally all subsequent tests fail also.
I'm running Ubuntu Linux 7.04 (Feisty) with PostgreSQL 8.2.4. I
checked out Rails edge (unmodified) from SVN. When I run 'rake
test_postgresql' in the activerecord directory, I get a ton of errors.
You can read them at:
http://izumi.plan99.net/ruby-postgresql-errors.txt
They're mostly related to string escaping. Because of these problems I
cannot use binary columns in Ruby on Rails project, which uses
PostgreSQL.
Correction: you get a ton of warnings. There are no failures, except the schema/roles one I described in my previous post. These are all because of the first “ERROR: permission denied to create role”.
But I agree that the Postgres adapter for Rails should use the database in a way that doesn’t spawn these warnings.