1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

supports_insert_with_returning? caches false result also

This commit is contained in:
Jeremy Kemper 2008-06-11 09:06:36 -07:00
parent d0b3685a0e
commit 23df8befcd

View file

@ -324,10 +324,13 @@ module ActiveRecord
end end
def supports_insert_with_returning? def supports_insert_with_returning?
@supports_insert_with_returning ||= unless defined? @supports_insert_with_returning
@supports_insert_with_returning =
@connection.respond_to?(:server_version) && @connection.respond_to?(:server_version) &&
@connection.server_version >= 80200 @connection.server_version >= 80200
end end
@supports_insert_with_returning
end
# Returns the configured supported identifier length supported by PostgreSQL, # Returns the configured supported identifier length supported by PostgreSQL,
# or report the default of 63 on PostgreSQL 7.x. # or report the default of 63 on PostgreSQL 7.x.