ActiveRecord::ConnectionAdapters::PostgreSQLAdapter
The PostgreSQL adapter works both with the native C (http://ruby.scripting.ca/postgres/) and the pure Ruby (available both as gem and from http://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_order option.
-
:encoding - An optional client encoding that is used in a SET client_encoding TO <encoding> call on the connection.
-
:min_messages - An optional client min messages that is used in a SET client_min_messages TO <min_messages> call on the connection.
Constants
ADAPTER_NAME = 'PostgreSQL'
BYTEA_COLUMN_TYPE_OID = 17
MONEY_COLUMN_TYPE_OID = 790
NATIVE_DATABASE_TYPES = {\n:primary_key => "serial primary key",\n:string => { :name => "character varying", :limit => 255 },\n:text => { :name => "text" },\n:integer => { :name => "integer" },\n:float => { :name => "float" },\n:decimal => { :name => "decimal" },\n:datetime => { :name => "timestamp" },\n:timestamp => { :name => "timestamp" },\n:time => { :name => "time" },\n:date => { :name => "date" },\n:binary => { :name => "bytea" },\n:boolean => { :name => "boolean" },\n:xml => { :name => "xml" },\n:tsvector => { :name => "tsvector" }\n}
Files
- activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb