# Table of Contents - pg: The Ruby Interface to PostgreSQL

## Pages

- README
  - pg
  - Description
  - Build Status
  - Requirements
  - How To Install
  - Type Casts
  - Encoders / Decoders (ext/pg_*coder.c, lib/pg/*coder.rb)
  - PG::TypeMap and derivations (ext/pg_type_map*.c, lib/pg/type_map*.rb)
  - Contributing
  - Copying
  - Acknowledgments

## Classes and Modules

- Object
- Object::PGError
- PG
- PG::BasicTypeMapBasedOnResult
- PG::BasicTypeMapForQueries
- PG::BasicTypeMapForResults
- PG::BasicTypeMapForResults::WarningTypeMap
- PG::BasicTypeRegistry
- PG::BasicTypeRegistry::CoderMap
- PG::BinaryDecoder
- PG::BinaryDecoder::Boolean
- PG::BinaryDecoder::Bytea
- PG::BinaryDecoder::Float
- PG::BinaryDecoder::Integer
- PG::BinaryDecoder::String
- PG::BinaryDecoder::ToBase64
- PG::BinaryEncoder
- PG::BinaryEncoder::Boolean
- PG::BinaryEncoder::Bytea
- PG::BinaryEncoder::FromBase64
- PG::BinaryEncoder::Int2
- PG::BinaryEncoder::Int4
- PG::BinaryEncoder::Int8
- PG::BinaryEncoder::String
- PG::Coder
- PG::Coder::BinaryFormatting
- PG::CompositeCoder
- PG::CompositeDecoder
- PG::CompositeEncoder
- PG::Connection
- PG::ConnectionBad
- PG::Constants
- PG::CopyCoder
- PG::CopyDecoder
- PG::CopyEncoder
- PG::Error
- PG::InvalidChangeOfResultFields
- PG::InvalidResultStatus
- PG::NoResultError
- PG::NotAllCopyDataRetrieved
- PG::PGError
- PG::Result
- PG::ServerError
- PG::SimpleCoder
- PG::SimpleDecoder
- PG::SimpleEncoder
- PG::TextDecoder
- PG::TextDecoder::Array
- PG::TextDecoder::Boolean
- PG::TextDecoder::Bytea
- PG::TextDecoder::CopyRow
- PG::TextDecoder::Date
- PG::TextDecoder::Float
- PG::TextDecoder::FromBase64
- PG::TextDecoder::Identifier
- PG::TextDecoder::Integer
- PG::TextDecoder::JSON
- PG::TextDecoder::String
- PG::TextDecoder::TimestampWithTimeZone
- PG::TextDecoder::TimestampWithoutTimeZone
- PG::TextEncoder
- PG::TextEncoder::Array
- PG::TextEncoder::Boolean
- PG::TextEncoder::Bytea
- PG::TextEncoder::CopyRow
- PG::TextEncoder::Date
- PG::TextEncoder::Float
- PG::TextEncoder::Identifier
- PG::TextEncoder::Integer
- PG::TextEncoder::JSON
- PG::TextEncoder::QuotedLiteral
- PG::TextEncoder::String
- PG::TextEncoder::TimestampWithTimeZone
- PG::TextEncoder::TimestampWithoutTimeZone
- PG::TextEncoder::ToBase64
- PG::TypeMap
- PG::TypeMap::DefaultTypeMappable
- PG::TypeMapAllStrings
- PG::TypeMapByClass
- PG::TypeMapByColumn
- PG::TypeMapByMriType
- PG::TypeMapByOid
- PG::TypeMapInRuby
- PG::UnableToSend
- PGconn
- PGresult

## Methods

- ::conndefaults — PG::Connection
- ::conndefaults — PG::Connection
- ::conndefaults_hash — PG::Connection
- ::conndefaults_hash — PG::Connection
- ::connect — PG
- ::connect_start — PG::Connection
- ::connect_start — PG::Connection
- ::encrypt_password — PG::Connection
- ::encrypt_password — PG::Connection
- ::escape_bytea — PG::Connection
- ::escape_bytea — PG::Connection
- ::escape_string — PG::Connection
- ::escape_string — PG::Connection
- ::init_openssl — PG
- ::init_ssl — PG
- ::isthreadsafe — PG
- ::library_version — PG
- ::new — PG::Coder
- ::new — PG::Connection
- ::new — PG::TypeMapByColumn
- ::new — PG::BasicTypeRegistry::CoderMap
- ::new — PG::BasicTypeMapForResults
- ::new — PG::BasicTypeMapForResults::WarningTypeMap
- ::new — PG::BasicTypeMapBasedOnResult
- ::new — PG::BasicTypeMapForQueries
- ::new — PG::Connection
- ::new — PG::Coder::BinaryFormatting
- ::parse_connect_args — PG::Connection
- ::parse_connect_args — PG::Connection
- ::ping — PG::Connection
- ::ping — PG::Connection
- ::quote_connstr — PG::Connection
- ::quote_connstr — PG::Connection
- ::quote_ident — PG::Connection
- ::quote_ident — PG::Connection
- ::unescape_bytea — PG::Connection
- ::unescape_bytea — PG::Connection
- ::version_string — PG
- #== — PG::Coder
- #[] — PG::Result
- #[] — PG::TypeMapByClass
- #[] — PG::TypeMapByMriType
- #[] — PG::Result
- #[]= — PG::TypeMapByClass
- #[]= — PG::TypeMapByMriType
- #add_coder — PG::TypeMapByOid
- #async_exec — PG::Connection
- #async_exec — PG::Connection
- #async_query — PG::Connection
- #async_query — PG::Connection
- #autoclear? — PG::Result
- #autoclear? — PG::Result
- #backend_pid — PG::Connection
- #backend_pid — PG::Connection
- #block — PG::Connection
- #block — PG::Connection
- #build_column_map — PG::TypeMapByOid
- #cancel — PG::Connection
- #cancel — PG::Connection
- #check — PG::Result
- #check — PG::Result
- #check_format_and_direction — PG::BasicTypeRegistry
- #check_result — PG::Result
- #check_result — PG::Result
- #clear — PG::Result
- #clear — PG::Result
- #cleared? — PG::Result
- #cleared? — PG::Result
- #client_encoding= — PG::Connection
- #client_encoding= — PG::Connection
- #close — PG::Connection
- #close — PG::Connection
- #cmd_status — PG::Result
- #cmd_status — PG::Result
- #cmd_tuples — PG::Result
- #cmd_tuples — PG::Result
- #cmdtuples — PG::Result
- #cmdtuples — PG::Result
- #coder_by_name — PG::BasicTypeRegistry::CoderMap
- #coder_by_oid — PG::BasicTypeRegistry::CoderMap
- #coders — PG::TypeMapByClass
- #coders — PG::TypeMapByColumn
- #coders — PG::TypeMapByMriType
- #coders — PG::TypeMapByOid
- #column_values — PG::Result
- #column_values — PG::Result
- #conndefaults — PG::Connection
- #conndefaults — PG::Connection
- #conndefaults_hash — PG::Connection
- #conndefaults_hash — PG::Connection
- #connect_poll — PG::Connection
- #connect_poll — PG::Connection
- #connection_needs_password — PG::Connection
- #connection_needs_password — PG::Connection
- #connection_used_password — PG::Connection
- #connection_used_password — PG::Connection
- #conninfo — PG::Connection
- #conninfo — PG::Connection
- #conninfo_hash — PG::Connection
- #conninfo_hash — PG::Connection
- #consume_input — PG::Connection
- #consume_input — PG::Connection
- #copy_data — PG::Connection
- #copy_data — PG::Connection
- #db — PG::Connection
- #db — PG::Connection
- #decode — PG::Coder
- #decode — PG::TextDecoder::Date
- #decode — PG::TextDecoder::TimestampWithoutTimeZone
- #decode — PG::TextDecoder::TimestampWithTimeZone
- #decode — PG::TextDecoder::JSON
- #decoder_for_get_copy_data — PG::Connection
- #decoder_for_get_copy_data — PG::Connection
- #decoder_for_get_copy_data= — PG::Connection
- #decoder_for_get_copy_data= — PG::Connection
- #default_type_map — PG::TypeMap::DefaultTypeMappable
- #default_type_map= — PG::TypeMap::DefaultTypeMappable
- #delimiter — PG::CompositeCoder
- #delimiter — PG::CopyCoder
- #delimiter= — PG::CompositeCoder
- #delimiter= — PG::CopyCoder
- #describe_portal — PG::Connection
- #describe_portal — PG::Connection
- #describe_prepared — PG::Connection
- #describe_prepared — PG::Connection
- #dup — PG::Coder
- #each — PG::Result
- #each — PG::Result
- #each_row — PG::Result
- #each_row — PG::Result
- #elements_type= — PG::CompositeCoder
- #encode — PG::Coder
- #encode — PG::TextEncoder::Date
- #encode — PG::TextEncoder::TimestampWithoutTimeZone
- #encode — PG::TextEncoder::TimestampWithTimeZone
- #encode — PG::TextEncoder::JSON
- #encoder_for_put_copy_data — PG::Connection
- #encoder_for_put_copy_data — PG::Connection
- #encoder_for_put_copy_data= — PG::Connection
- #encoder_for_put_copy_data= — PG::Connection
- #error_field — PG::Result
- #error_field — PG::Result
- #error_message — PG::Connection
- #error_message — PG::Result
- #error_message — PG::Connection
- #error_message — PG::Result
- #escape — PG::Connection
- #escape — PG::Connection
- #escape_bytea — PG::Connection
- #escape_bytea — PG::Connection
- #escape_identifier — PG::Connection
- #escape_identifier — PG::Connection
- #escape_literal — PG::Connection
- #escape_literal — PG::Connection
- #escape_string — PG::Connection
- #escape_string — PG::Connection
- #exec — PG::Connection
- #exec — PG::Connection
- #exec_params — PG::Connection
- #exec_params — PG::Connection
- #exec_prepared — PG::Connection
- #exec_prepared — PG::Connection
- #external_encoding — PG::Connection
- #external_encoding — PG::Connection
- #fformat — PG::Result
- #fformat — PG::Result
- #field_values — PG::Result
- #field_values — PG::Result
- #fields — PG::Result
- #fields — PG::Result
- #finish — PG::Connection
- #finish — PG::Connection
- #finished? — PG::Connection
- #finished? — PG::Connection
- #fit_to_copy_get — PG::TypeMapInRuby
- #fit_to_query — PG::TypeMapInRuby
- #fit_to_result — PG::TypeMapInRuby
- #flush — PG::Connection
- #flush — PG::Connection
- #fmod — PG::Result
- #fmod — PG::Result
- #fname — PG::Result
- #fname — PG::Result
- #fnumber — PG::Result
- #fnumber — PG::Result
- #format — PG::Coder
- #format= — PG::Coder
- #fsize — PG::Result
- #fsize — PG::Result
- #ftable — PG::Result
- #ftable — PG::Result
- #ftablecol — PG::Result
- #ftablecol — PG::Result
- #ftype — PG::Result
- #ftype — PG::Result
- #get_client_encoding — PG::Connection
- #get_client_encoding — PG::Connection
- #get_copy_data — PG::Connection
- #get_copy_data — PG::Connection
- #get_last_result — PG::Connection
- #get_last_result — PG::Connection
- #get_result — PG::Connection
- #get_result — PG::Connection
- #getisnull — PG::Result
- #getisnull — PG::Result
- #getlength — PG::Result
- #getlength — PG::Result
- #getvalue — PG::Result
- #getvalue — PG::Result
- #host — PG::Connection
- #host — PG::Connection
- #inspect — PG::Coder
- #inspect — PG::CompositeCoder
- #inspect — PG::Result
- #inspect — PG::TypeMapByColumn
- #inspect — PG::Result
- #internal_encoding — PG::Connection
- #internal_encoding — PG::Connection
- #internal_encoding= — PG::Connection
- #internal_encoding= — PG::Connection
- #is_busy — PG::Connection
- #is_busy — PG::Connection
- #isnonblocking — PG::Connection
- #isnonblocking — PG::Connection
- #lo_close — PG::Connection
- #lo_close — PG::Connection
- #lo_creat — PG::Connection
- #lo_creat — PG::Connection
- #lo_create — PG::Connection
- #lo_create — PG::Connection
- #lo_export — PG::Connection
- #lo_export — PG::Connection
- #lo_import — PG::Connection
- #lo_import — PG::Connection
- #lo_lseek — PG::Connection
- #lo_lseek — PG::Connection
- #lo_open — PG::Connection
- #lo_open — PG::Connection
- #lo_read — PG::Connection
- #lo_read — PG::Connection
- #lo_seek — PG::Connection
- #lo_seek — PG::Connection
- #lo_tell — PG::Connection
- #lo_tell — PG::Connection
- #lo_truncate — PG::Connection
- #lo_truncate — PG::Connection
- #lo_unlink — PG::Connection
- #lo_unlink — PG::Connection
- #lo_write — PG::Connection
- #lo_write — PG::Connection
- #loclose — PG::Connection
- #loclose — PG::Connection
- #locreat — PG::Connection
- #locreat — PG::Connection
- #locreate — PG::Connection
- #locreate — PG::Connection
- #loexport — PG::Connection
- #loexport — PG::Connection
- #loimport — PG::Connection
- #loimport — PG::Connection
- #lolseek — PG::Connection
- #lolseek — PG::Connection
- #loopen — PG::Connection
- #loopen — PG::Connection
- #loread — PG::Connection
- #loread — PG::Connection
- #loseek — PG::Connection
- #loseek — PG::Connection
- #lotell — PG::Connection
- #lotell — PG::Connection
- #lotruncate — PG::Connection
- #lotruncate — PG::Connection
- #lounlink — PG::Connection
- #lounlink — PG::Connection
- #lowrite — PG::Connection
- #lowrite — PG::Connection
- #make_empty_pgresult — PG::Connection
- #make_empty_pgresult — PG::Connection
- #map_types! — PG::Result
- #map_types! — PG::Result
- #marshal_dump — PG::Coder
- #marshal_load — PG::Coder
- #max_rows_for_online_lookup — PG::TypeMapByOid
- #max_rows_for_online_lookup= — PG::TypeMapByOid
- #needs_quotation= — PG::CompositeCoder
- #needs_quotation? — PG::CompositeCoder
- #nfields — PG::Result
- #nfields — PG::Result
- #nonblocking? — PG::Connection
- #nonblocking? — PG::Connection
- #notifies — PG::Connection
- #notifies — PG::Connection
- #notifies_wait — PG::Connection
- #notifies_wait — PG::Connection
- #nparams — PG::Result
- #nparams — PG::Result
- #ntuples — PG::Result
- #ntuples — PG::Result
- #null_string — PG::CopyCoder
- #null_string= — PG::CopyCoder
- #num_fields — PG::Result
- #num_fields — PG::Result
- #num_tuples — PG::Result
- #num_tuples — PG::Result
- #oid — PG::Coder
- #oid= — PG::Coder
- #oid_value — PG::Result
- #oid_value — PG::Result
- #oids — PG::TypeMapByColumn
- #options — PG::Connection
- #options — PG::Connection
- #parameter_status — PG::Connection
- #parameter_status — PG::Connection
- #paramtype — PG::Result
- #paramtype — PG::Result
- #pass — PG::Connection
- #pass — PG::Connection
- #port — PG::Connection
- #port — PG::Connection
- #prepare — PG::Connection
- #prepare — PG::Connection
- #protocol_version — PG::Connection
- #protocol_version — PG::Connection
- #put_copy_data — PG::Connection
- #put_copy_data — PG::Connection
- #put_copy_end — PG::Connection
- #put_copy_end — PG::Connection
- #query — PG::Connection
- #query — PG::Connection
- #quote_ident — PG::Connection
- #quote_ident — PG::Connection
- #res_status — PG::Result
- #res_status — PG::Result
- #reset — PG::Connection
- #reset — PG::Connection
- #reset_poll — PG::Connection
- #reset_poll — PG::Connection
- #reset_start — PG::Connection
- #reset_start — PG::Connection
- #result_error_field — PG::Result
- #result_error_field — PG::Result
- #result_error_message — PG::Result
- #result_error_message — PG::Result
- #result_status — PG::Result
- #result_status — PG::Result
- #rm_coder — PG::TypeMapByOid
- #send_describe_portal — PG::Connection
- #send_describe_portal — PG::Connection
- #send_describe_prepared — PG::Connection
- #send_describe_prepared — PG::Connection
- #send_prepare — PG::Connection
- #send_prepare — PG::Connection
- #send_query — PG::Connection
- #send_query — PG::Connection
- #send_query_prepared — PG::Connection
- #send_query_prepared — PG::Connection
- #server_version — PG::Connection
- #server_version — PG::Connection
- #set_client_encoding — PG::Connection
- #set_client_encoding — PG::Connection
- #set_default_encoding — PG::Connection
- #set_default_encoding — PG::Connection
- #set_error_verbosity — PG::Connection
- #set_error_verbosity — PG::Connection
- #set_notice_processor — PG::Connection
- #set_notice_processor — PG::Connection
- #set_notice_receiver — PG::Connection
- #set_notice_receiver — PG::Connection
- #set_single_row_mode — PG::Connection
- #set_single_row_mode — PG::Connection
- #setnonblocking — PG::Connection
- #setnonblocking — PG::Connection
- #socket — PG::Connection
- #socket — PG::Connection
- #socket_io — PG::Connection
- #socket_io — PG::Connection
- #ssl_attribute — PG::Connection
- #ssl_attribute — PG::Connection
- #ssl_attribute_names — PG::Connection
- #ssl_attribute_names — PG::Connection
- #ssl_attributes — PG::Connection
- #ssl_attributes — PG::Connection
- #ssl_in_use? — PG::Connection
- #ssl_in_use? — PG::Connection
- #status — PG::Connection
- #status — PG::Connection
- #stream_each — PG::Result
- #stream_each — PG::Result
- #stream_each_row — PG::Result
- #stream_each_row — PG::Result
- #to_h — PG::Coder
- #to_h — PG::CompositeCoder
- #to_h — PG::CopyCoder
- #trace — PG::Connection
- #trace — PG::Connection
- #transaction — PG::Connection
- #transaction — PG::Connection
- #transaction_status — PG::Connection
- #transaction_status — PG::Connection
- #tty — PG::Connection
- #tty — PG::Connection
- #type_map — PG::CopyCoder
- #type_map — PG::Result
- #type_map — PG::Result
- #type_map= — PG::CopyCoder
- #type_map= — PG::Result
- #type_map= — PG::Result
- #type_map_for_queries — PG::Connection
- #type_map_for_queries — PG::Connection
- #type_map_for_queries= — PG::Connection
- #type_map_for_queries= — PG::Connection
- #type_map_for_results — PG::Connection
- #type_map_for_results — PG::Connection
- #type_map_for_results= — PG::Connection
- #type_map_for_results= — PG::Connection
- #typecast_copy_get — PG::TypeMapInRuby
- #typecast_query_param — PG::TypeMapInRuby
- #typecast_result_value — PG::TypeMapInRuby
- #typecast_result_value — PG::BasicTypeMapForResults::WarningTypeMap
- #unescape_bytea — PG::Connection
- #unescape_bytea — PG::Connection
- #untrace — PG::Connection
- #untrace — PG::Connection
- #user — PG::Connection
- #user — PG::Connection
- #values — PG::Result
- #values — PG::Result
- #wait_for_notify — PG::Connection
- #wait_for_notify — PG::Connection
- #with_default_type_map — PG::TypeMap::DefaultTypeMappable