class PostgreSQLAdapter
Ruby on Rails 5.0.7.2
The PostgreSQL adapter works with the native C (bitbucket.org/ged/ruby-pg) driver.
Options:
-
:host- Defaults to a Unix-domain socket in /tmp. On machines without Unix-domain sockets, the default is to connect to localhost. -
:port- Defaults to 5432. -
:username- Defaults to be the same as the operating system name of the user running the application. -
:password- Password to be used if the server demands password authentication. -
:database- Defaults to be the same as the user name. -
:schema_search_path- An optional schema search path for the connection given as a string of comma-separated schema names. This is backward-compatible with the:schema_orderoption. -
:encoding- An optional client encoding that is used in aSET client_encoding TO <encoding>call on the connection. -
:min_messages- An optional client min messages that is used in aSET client_min_messages TO <min_messages>call on the connection. -
:variables- An optional hash of additional parameters that will be used inSET SESSION key = valcalls on the connection. -
:insert_returning- An optional boolean to control the use ofRETURNINGforINSERTstatements defaults to true.
Any further options are used as connection parameters to libpq. See www.postgresql.org/docs/current/static/libpq-connect.html for the list of parameters.
In addition, default connection parameters of libpq can be set per environment variables. See www.postgresql.org/docs/current/static/libpq-envars.html .
Inherits from
Namespace
Classes
Includes
Constants
- ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::ADAPTER_NAME
- ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::CACHED_PLAN_HEURISTIC
- ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::FEATURE_NOT_SUPPORTED
- ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::FOREIGN_KEY_VIOLATION
- ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::NATIVE_DATABASE_TYPES
- ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID
- ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OPERATION_ALIASES
- ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::UNIQUE_VIOLATION
- ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::VALUE_LIMIT_VIOLATION
Methods (defined here)
- # active?
- # clear_cache!
- # disable_extension
- # disconnect!
- # enable_extension
- # extension_enabled?
- # extensions
- # index_algorithms
- # index_name_length
- # max_identifier_length
- # postgresql_version
- # reconnect!
- # reset!
- # session_auth=
- # set_standard_conforming_strings
- # supports_advisory_locks?
- # supports_comments?
- # supports_datetime_with_precision?
- # supports_ddl_transactions?
- # supports_explain?
- # supports_expression_index?
- # supports_extensions?
- # supports_foreign_keys?
- # supports_index_sort_order?
- # supports_json?
- # supports_materialized_views?
- # supports_migrations?
- # supports_partial_index?
- # supports_ranges?
- # supports_savepoints?
- # supports_statement_cache?
- # supports_transaction_isolation?
- # supports_views?
- # table_alias_length
- # translate_exception
- # truncate
- # use_insert_returning?
- # valid_type?
- self. new
Private methods (13)
Show private methods Implementation detail — not part of the public API.
Methods (inherited)
From ActiveRecord::ConnectionAdapters::AbstractAdapter
(51)
- # active?
- # adapter_name
- # case_insensitive_comparison
- # case_sensitive_comparison
- # clear_cache!
- # close
- # collector
- # disable_extension
- # disable_referential_integrity
- # disconnect!
- # enable_extension
- # expire
- # extensions
- # index_algorithms
- # lease
- # log
- # prefetch_primary_key?
- # raw_connection
- # reconnect!
- # requires_reloading?
- # reset!
- # schema_cache=
- # schema_creation
- # supports_advisory_locks?
- # supports_bulk_alter?
- # supports_comments?
- # supports_comments_in_create?
- # supports_datetime_with_precision?
- # supports_ddl_transactions?
- # supports_explain?
- # supports_expression_index?
- # supports_extensions?
- # supports_foreign_keys?
- # supports_index_sort_order?
- # supports_indexes_in_create?
- # supports_json?
- # supports_migrations?
- # supports_multi_insert?
- # supports_partial_index?
- # supports_primary_key?
- # supports_savepoints?
- # supports_transaction_isolation?
- # supports_views?
- # translate_exception
- # translate_exception_class
- # unprepared_statement
- # valid_type?
- # verify!
- # without_prepared_statement?
- self. type_cast_config_to_boolean
- self. type_cast_config_to_integer
From ActiveRecord::ConnectionAdapters::PostgreSQL::ColumnDumper
(3)
From ActiveRecord::ConnectionAdapters::PostgreSQL::DatabaseStatements
(13)
From ActiveRecord::ConnectionAdapters::PostgreSQL::Quoting
(4)
From ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaStatements
(26)
- # client_min_messages
- # client_min_messages=
- # collation
- # create_database
- # create_schema
- # ctype
- # current_database
- # current_schema
- # data_source_exists?
- # data_sources
- # drop_schema
- # encoding
- # fetch_type_metadata
- # foreign_keys
- # index_name_exists?
- # indexes
- # rename_index
- # rename_table
- # schema_exists?
- # schema_names
- # schema_search_path
- # schema_search_path=
- # serial_sequence
- # table_exists?
- # tables
- # type_to_sql
From ActiveRecord::ConnectionAdapters::ColumnDumper
(4)
From ActiveRecord::ConnectionAdapters::DatabaseLimits
(11)
From ActiveRecord::ConnectionAdapters::QueryCache
(8)
- # cache
- # clear_query_cache
- # disable_query_cache!
- # enable_query_cache!
- # select_all
- # uncached
- self. dirties_query_cache
- self. new
From ActiveRecord::ConnectionAdapters::Savepoints
(4)
From ActiveSupport::Callbacks
(1)
From Object
(25)
- # <
- # acts_like?
- # blank?
- # change
- # create_fixtures
- # deep_dup
- # destroy
- # duplicable?
- # html_safe?
- # in?
- # instance_values
- # instance_variable_names
- # perform
- # presence
- # presence_in
- # present?
- # subscribed
- # to_param
- # to_query
- # try
- # try!
- # unescape
- # unsubscribed
- # with_options
- self. table_name_prefix
From ActiveSupport::Concern
(3)
From ActiveSupport::DescendantsTracker
(7)
- # descendants
- # direct_descendants
- # inherited
- self. clear
- self. descendants
- self. direct_descendants
- self. store_inherited