diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-02-09 18:06:29 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-02-09 18:06:29 +0000 |
commit | 5991e5c789da5adc260ceb9ba77da31d65991fbc (patch) | |
tree | a6613a2a8e3806af0b72da42a5e4d2c598eb7f5f /activerecord/lib/active_record/connection_adapters | |
parent | d49a5fcb4cfe90824337dc3756bae7161cea768b (diff) | |
download | rails-5991e5c789da5adc260ceb9ba77da31d65991fbc.tar.gz rails-5991e5c789da5adc260ceb9ba77da31d65991fbc.tar.bz2 rails-5991e5c789da5adc260ceb9ba77da31d65991fbc.zip |
PostgreSQL: correctly parse negative integer column defaults. References #3776.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3554 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index 066a71fab6..a5bef4138d 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -468,7 +468,7 @@ module ActiveRecord return $1 if value =~ /^'(.*)'::(bpchar|text|character varying)$/ # Numeric values - return value if value =~ /^[0-9]+(\.[0-9]*)?/ + return value if value =~ /^-?[0-9]+(\.[0-9]*)?/ # Date / Time magic values return Time.now.to_s if value =~ /^now\(\)|^\('now'::text\)::(date|timestamp)/i |