diff options
Diffstat (limited to 'activerecord/lib/active_record')
-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 |