`column` may be either an instance of Column or ColumnDefinition.
# File activerecord/lib/active_record/connection_adapters/postgresql/quoting.rb, line 157
def quote_default_expression(value, column) # :nodoc:
if value.is_a?(Proc)
value.call
elsif column.type == :uuid && value.is_a?(String) && value.include?("()")
value # Does not quote function default values for UUID columns
elsif column.respond_to?(:array?)
# TODO: Remove fetch_cast_type and the need for connection after we release 8.1.
quote(column.fetch_cast_type(self).serialize(value))
else
super
end
end