diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2016-01-31 03:59:30 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2016-01-31 03:59:30 +0900 |
commit | bee8bb580196d62bd4cd2a10acaa5d5e8d4849d1 (patch) | |
tree | ce311cc98b5e221ea6eaa66b0ddd051b02711f02 | |
parent | a398cd0bcbd39998f1b0313e6fe3f04bf491b3db (diff) | |
download | rails-bee8bb580196d62bd4cd2a10acaa5d5e8d4849d1.tar.gz rails-bee8bb580196d62bd4cd2a10acaa5d5e8d4849d1.tar.bz2 rails-bee8bb580196d62bd4cd2a10acaa5d5e8d4849d1.zip |
`OID::Money.precision` is unused since #15239
p PostgreSQLAdapter::OID::Money.precision
# => 19
p PostgreSQLAdapter::OID::Money.new.precision
# => nil
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql/oid/money.rb | 2 | ||||
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 6 |
2 files changed, 0 insertions, 8 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/oid/money.rb b/activerecord/lib/active_record/connection_adapters/postgresql/oid/money.rb index 2163674019..dcc12ae2a4 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/oid/money.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/oid/money.rb @@ -3,8 +3,6 @@ module ActiveRecord module PostgreSQL module OID # :nodoc: class Money < Type::Decimal # :nodoc: - class_attribute :precision - def type :money end diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index 2de6fbfaf0..820ee3565c 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -645,12 +645,6 @@ module ActiveRecord # connected server's characteristics. def connect @connection = PGconn.connect(@connection_parameters) - - # Money type has a fixed precision of 10 in PostgreSQL 8.2 and below, and as of - # PostgreSQL 8.3 it has a fixed precision of 19. PostgreSQLColumn.extract_precision - # should know about this but can't detect it there, so deal with it here. - OID::Money.precision = (postgresql_version >= 80300) ? 19 : 10 - configure_connection rescue ::PG::Error => error if error.message.include?("does not exist") |