lib/active_record/connection_adapters/redshift_adapter.rb
# Configures the encoding, verbosity, schema search path, and time zone of the connection.
# This is called by #connect and should not be called manually.
Configures the encoding, verbosity, schema search path, and time zone of the connection.
This is called by #connect and should not be called manually.
Configures the encoding verbosity schema search path and time zone of the connection . This is called by #connect and should not be called manually .
def configure_connection
          if @config[:encoding]
            @connection.set_client_encoding(@config[:encoding])
          end
          self.schema_search_path = @config[:schema_search_path] || @config[:schema_order]
          variables = @config.fetch(:variables, {}).stringify_keys
          unless variables["timezone"]
            if ActiveRecord::Base.default_timezone == :utc
              variables["timezone"] = "UTC"
            elsif @local_tz
              variables["timezone"] = @local_tz
            end
          end
        end
def configure_connection if @config [ :encoding ] @connection . set_client_encoding ( @config [ :encoding ] ) end self . schema_search_path = @config [ :schema_search_path ] || @config [ :schema_order ] variables = @config . fetch ( :variables , { } ) . stringify_keys unless variables [ "timezone" ] if ActiveRecord :: Base . default_timezone == :utc variables [ "timezone" ] = "UTC" elsif @local_tz variables [ "timezone" ] = @local_tz end end end
Configures the encoding, verbosity, schema search path, and time zone of the connection.
Configures the encoding verbosity schema search path and time zone of the connection .
# If using Active Record's time zone support configure the connection to return # TIMESTAMP WITH ZONE types in UTC.