Permalink
Browse files

supports_insert_with_returning? caches false result also

  • Loading branch information...
jeremy committed Jun 11, 2008
1 parent d0b3685 commit 23df8befcd557a3294b8a87cf68fd21b1a9d9a49
Showing with 6 additions and 3 deletions.
  1. +6 −3 activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -324,9 +324,12 @@ def supports_standard_conforming_strings?
end
def supports_insert_with_returning?
- @supports_insert_with_returning ||=
- @connection.respond_to?(:server_version) &&
- @connection.server_version >= 80200
+ unless defined? @supports_insert_with_returning
+ @supports_insert_with_returning =
+ @connection.respond_to?(:server_version) &&
+ @connection.server_version >= 80200
+ end
+ @supports_insert_with_returning
end
# Returns the configured supported identifier length supported by PostgreSQL,

0 comments on commit 23df8be

Please sign in to comment.