diff options
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql/column.rb')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql/column.rb | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/column.rb b/activerecord/lib/active_record/connection_adapters/postgresql/column.rb index 9a5e2d05ef..1458fbf496 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/column.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/column.rb @@ -1,5 +1,3 @@ -require 'active_record/connection_adapters/postgresql/cast' - module ActiveRecord module ConnectionAdapters # PostgreSQL-specific extensions to column definitions in a table. @@ -18,26 +16,8 @@ module ActiveRecord @default_function = default_function end - # :stopdoc: - class << self - include PostgreSQL::Cast - - # Loads pg_array_parser if available. String parsing can be - # performed quicker by a native extension, which will not create - # a large amount of Ruby objects that will need to be garbage - # collected. pg_array_parser has a C and Java extension - begin - require 'pg_array_parser' - include PgArrayParser - rescue LoadError - require 'active_record/connection_adapters/postgresql/array_parser' - include PostgreSQL::ArrayParser - end - end - # :startdoc: - - def accessor - cast_type.accessor + def serial? + default_function && default_function =~ /\Anextval\(.*\)\z/ end end end |