Class ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
In: lib/active_record/connection_adapters/postgresql_adapter.rb
Parent: AbstractAdapter

The PostgreSQL adapter works both with the C-based (www.postgresql.jp/interfaces/ruby/) and the Ruby-base (available both as gem and from rubyforge.org/frs/?group_id=234&release_id=1145) 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_order option.
  • :encoding — An optional client encoding that is using in a SET client_encoding TO <encoding> call on connection.
  • :min_messages — An optional client min messages that is using in a SET client_min_messages TO <min_messages> call on connection.

Methods

Constants

BYTEA_COLUMN_TYPE_OID = 17

Public Instance methods

delete(sql, name = nil)

Alias for update

Set the schema search path to a string of comma-separated schema names. Names beginning with $ are quoted (e.g. $user => ’$user’) See www.postgresql.org/docs/8.0/interactive/ddl-schemas.html

[Validate]