Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

supports_disable_referential_integrity? is wrong

#6672

supports_disable_referential_integrity? in postgresql adapter on 2.3 stable looks like this:

 def supports_disable_referential_integrity?() #:nodoc:
    version = query("SHOW server_version")[0][0].split('.')
    (version[0].to_i >= 8 && version[1].to_i >= 1) ? true : false
  rescue
    return false
  end

So it returns false for 9.0.x , which is wrong.

The correct version is in 3.0 branch:

 def supports_disable_referential_integrity?()
   postgresql_version >= 80100
 end

Anybody cares to backpatch?

Reported by Marcin Mańk · April 5th, 2011 @ 11:40 AM

State: new
Milestone: none
Assigned to: nobody
Importance: none

Activity

No comments yet.