#93 ✓resolved
Bjørn Arild Mæland

Spec breakage on Leopard, using Postgres adapter

Reported by Bjørn Arild Mæland | December 12th, 2007 @ 04:07 PM

These specs currently only break on Leopard (probably Tiger as well) with the PostgreSQL adapter enabeled:

-'A tree should work' FAILED

-'DataMapper::Base should be comparable' FAILED

-DataObject::QueryError in 'DataMapper::Adapters::PostgresqlAdapter::Mappings::Table should search only the specified schema if qualified'

-'DataMapper::Adapters::Sql::Mappings::Schema should return all tables from the database schema' FAILED

Comments and changes to this ticket

  • Dane Jensen

    Dane Jensen December 14th, 2007 @ 03:39 PM

    The 'DataMapper::Adapters::PostgresqlAdapter::Mappings::Table should search only the specified schema if qualified' spec is likely failing because the SQL generated is:

    SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'my_schema.cages' AND TABLE_CATALOG = 'data_mapper_1'
    
    But table_name is only the name of the table, the schema name is in table_schema. This would work however:
    
    

    SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'cages' AND TABLE_SCHEMA = 'my_schema' AND TABLE_CATALOG = 'data_mapper_1'

  • Bjørn Arild Mæland

    Bjørn Arild Mæland December 18th, 2007 @ 06:27 AM

    • State changed from “new” to “open”

    Running the spec suite on Debian 4.0 with PostgreSQL 8.1 causes 7 errors.

  • Dane Jensen

    Dane Jensen December 23rd, 2007 @ 01:33 PM

    I've attached a patch that fixes the errors in postgres_spec.rb that were preventing it from running.

  • Dane Jensen
  • Dane Jensen

    Dane Jensen December 27th, 2007 @ 10:18 AM

    And with fix_postgres_spec.rb.patch applied, the spec fails with:

    'DataMapper::Adapters::PostgresqlAdapter::Mappings::Table should search only the specified schema if qualified' FAILED
    expected: true,
         got: false (using ==)
    ./spec/postgres_spec.rb:57:
    
    Which is fixed by postgres_schema_support.patch, but probably not in the most elegant way. I'm still getting acquainted with the source :).
    
  • Sam Smoot

    Sam Smoot December 27th, 2007 @ 10:19 AM

    • Milestone cleared.

    Putting this on the plate for 0.3.0. Want to make sure that's the "production ready" release.

  • Sam Smoot

    Sam Smoot January 13th, 2008 @ 11:49 PM

    • State changed from “open” to “resolved”

    These should be resolved I believe. If we have other breakages, let's open new tickets.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

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

People watching this ticket

Referenced by

Pages