This project is archived and is in readonly mode.

#2256 ✓stale
Mezza

Postgresql adapter breaks tests with Postgresql 8.3

Reported by Mezza | March 16th, 2009 @ 06:07 PM | in 3.x

With Postgresql 8.3 and TSearch2 some of the TSearch2 specific tables (pg_ts_dict, pg_ts_parser) are not just present in the public schema within which the application database exists, but also in the pg_catalog schema.

As they're consequently system tables, when running tests and using SQL format for generation of the test database structure the postgresql connection adapter attempts to enable or disable triggers on the TSearch2 tables, which raises a permissions issue. You have to use SQL format for creating the test database as the TSearch2 tables have no corresponding model and are not exported in the ruby schema normally used.

This wasn't an issue with PostgreSQL 8.1, as the TSearch2 tables were only in the public schema, and not system tables.

A solution is to exclude any tables in the exported SQL dump which are also in the pg_catalog schema.

Difficult to provide a self-contained test for this, since it requires testing against a Postgresql 8.1 and 8.3 db.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Pages