Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OID::Money.precision is unused since #15239 #23360

Merged
merged 1 commit into from
Feb 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ module ConnectionAdapters
module PostgreSQL
module OID # :nodoc:
class Money < Type::Decimal # :nodoc:
class_attribute :precision

def type
:money
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -645,12 +645,6 @@ def prepare_statement(sql)
# 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")
Expand Down