diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2017-04-26 22:25:04 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-26 22:25:04 -0700 |
commit | 1583e260f9278986f3c4ea3702c081727838c290 (patch) | |
tree | 73fad0fc1b0261e601d147d5300ad24b2366dbe7 /activerecord/lib/active_record | |
parent | 9e08e8bbb105ceb429afd2cad8287f026f3c677e (diff) | |
parent | 4181b677e5164a18fe25767c5bf9eeb3df800231 (diff) | |
download | rails-1583e260f9278986f3c4ea3702c081727838c290.tar.gz rails-1583e260f9278986f3c4ea3702c081727838c290.tar.bz2 rails-1583e260f9278986f3c4ea3702c081727838c290.zip |
Merge pull request #28883 from yahonda/fix28797
PostgreSQL 10 does not convert `CURRENT_DATE` into `('now'::text)::date`
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 541013c1e7..033d81916e 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -555,7 +555,7 @@ module ActiveRecord end def has_default_function?(default_value, default) - !default_value && (%r{\w+\(.*\)|\(.*\)::\w+} === default) + !default_value && %r{\w+\(.*\)|\(.*\)::\w+|CURRENT_DATE|CURRENT_TIMESTAMP}.match?(default) end def load_additional_types(type_map, oids = nil) |