Browse files

Fix Bug: disable_referential_integrity doesn't work for postgres 9.0.1

  • Loading branch information...
1 parent 61f2d52 commit f33968ab7ad436af3100e82ad6fefb0836d4a521 @matthewrudy matthewrudy committed with tenderlove Nov 21, 2010
Showing with 1 addition and 4 deletions.
  1. +1 −4 activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
View
5 activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -378,10 +378,7 @@ def quoted_date(value) #:nodoc:
# REFERENTIAL INTEGRITY ====================================
def supports_disable_referential_integrity?() #:nodoc:
- version = query("SHOW server_version")[0][0].split('.')
- version[0].to_i >= 8 && version[1].to_i >= 1
- rescue
- return false
+ postgresql_version >= 80100
end
def disable_referential_integrity #:nodoc:

0 comments on commit f33968a

Please sign in to comment.