diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2005-09-27 23:37:57 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2005-09-27 23:37:57 +0000 |
commit | 0bd11857ef47d9c8228d9c1d8268a7a35768966b (patch) | |
tree | 16bbaabbbca682883ec2e6172b7cb43621d263fd /activerecord/lib | |
parent | e1024e50cf72ade51b1b2231f1ba6649b4826b7d (diff) | |
download | rails-0bd11857ef47d9c8228d9c1d8268a7a35768966b.tar.gz rails-0bd11857ef47d9c8228d9c1d8268a7a35768966b.tar.bz2 rails-0bd11857ef47d9c8228d9c1d8268a7a35768966b.zip |
Ticket 2256 - Recognize PostgreSQL NOW() default as equivalent to CURRENT_TIMESTAMP/CURRENT_DATE
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2378 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib')
-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 037f5f6869..cee3483e35 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -369,7 +369,7 @@ module ActiveRecord return value if value =~ /^[0-9]+(\.[0-9]*)?/ # Date / Time magic values - return Time.now.to_s if value =~ /^\('now'::text\)::(date|timestamp)/ + return Time.now.to_s if value =~ /^now\(\)|^\('now'::text\)::(date|timestamp)/i # Fixed dates / times return $1 if value =~ /^'(.+)'::(date|timestamp)/ |