Browse files

Fixed negative default integer parsing for Postgresql 8.3.3

Signed-off-by: Michael Koziarski <michael@koziarski.com>
  • Loading branch information...
1 parent 6d8d77e commit b999bb847809a67beda6d7085746c03c5c7b1d71 @tarmo tarmo committed Jul 31, 2008
Showing with 2 additions and 2 deletions.
  1. +2 −2 activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
View
4 activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -182,8 +182,8 @@ def simplified_type(field_type)
def self.extract_value_from_default(default)
case default
# Numeric types
- when /\A-?\d+(\.\d*)?\z/
- default
+ when /\A\(?(-?\d+(\.\d*)?\)?)\z/
+ $1
# Character types
when /\A'(.*)'::(?:character varying|bpchar|text)\z/m
$1

0 comments on commit b999bb8

Please sign in to comment.