class PostgreSQLAdapter
Ruby on Rails 2.3.18
Since v2.2.3The PostgreSQL adapter works both with the native C (ruby.scripting.ca/postgres/) and the pure Ruby (available both as gem and from rubyforge.org/frs/?group_id=234&release_id=1944) drivers.
Options:
-
:host- Defaults to “localhost”. -
:port- Defaults to 5432. -
:username- Defaults to nothing. -
:password- Defaults to nothing. -
:database- The name of the database. No default, must be provided. -
: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. -
:allow_concurrency- If true, use async query methods so Ruby threads don’t deadlock; otherwise, use blocking query methods.
Inherits from
Constants
Methods (defined here)
- # active?
- # adapter_name
- # add_column
- # begin_db_transaction
- # change_column
- # change_column_default
- # change_column_null
- # client_min_messages
- # client_min_messages=
- # columns
- # commit_db_transaction
- # create_database
- # create_savepoint
- # current_database
- # disconnect!
- # encoding
- # escape_bytea
- # execute
- # indexes
- # index_name_length
- # insert
- # outside_transaction?
- # postgresql_version
- # primary_key
- # quote_table_name
- # reconnect!
- # release_savepoint
- # rename_column
- # rename_table
- # rollback_db_transaction
- # rollback_to_savepoint
- # schema_search_path
- # schema_search_path=
- # select_rows
- # set_standard_conforming_strings
- # supports_ddl_transactions?
- # supports_insert_with_returning?
- # supports_migrations?
- # supports_savepoints?
- # table_alias_length
- # tables
- # type_to_sql
- # unescape_bytea
- # update_sql
- self. new
Private methods
(5)
Implementation detail — not part of the public API.
Methods (inherited)
From ActiveRecord::ConnectionAdapters::AbstractAdapter (27)
- # active?
- # adapter_name
- # create_savepoint
- # current_savepoint_name
- # decrement_open_transactions
- # disable_referential_integrity
- # disconnect!
- # format_log_entry
- # increment_open_transactions
- # log
- # log_info
- # open_transactions
- # prefetch_primary_key?
- # quote_table_name
- # raw_connection
- # reconnect!
- # release_savepoint
- # requires_reloading?
- # reset!
- # rollback_to_savepoint
- # supports_count_distinct?
- # supports_ddl_transactions?
- # supports_migrations?
- # supports_primary_key?
- # supports_savepoints?
- # transaction_joinable=
- # verify!
From ActiveRecord::ConnectionAdapters::QueryCache (7)
- # cache
- # clear_query_cache
- # columns_with_query_cache
- # select_all_with_query_cache
- # uncached
- self. dirties_query_cache
- self. included
From ActiveSupport::Callbacks (2)
- # run_callbacks
- self. included
From Object (37)
- # acts_like?
- # app
- # as_json
- # blank?
- # class_eval
- # create
- # create_fixtures
- # destroy
- # duplicable?
- # edit
- # find_cmd
- # helper
- # html_safe?
- # index
- # instance_exec
- # instance_variable_defined?
- # instance_variable_names
- # message
- # metaclass
- # new_session
- # presence
- # present?
- # reload!
- # returning
- # singleton_class
- # tap
- # to_json
- # to_param
- # to_query
- # try
- # unescape
- # update
- # with_options
- self. blank_slate_method_added
- self. find_hidden_method
- self. lookup_missing_generator
- self. method_added