<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Class: ActiveRecord::ConnectionAdapters::PostgreSQLAdapter</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <meta http-equiv="Content-Script-Type" content="text/javascript" /> <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> <script type="text/javascript"> // <![CDATA[ function popupCode( url ) { window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400") } function toggleCode( id ) { if ( document.getElementById ) elem = document.getElementById( id ); else if ( document.all ) elem = eval( "document.all." + id ); else return false; elemStyle = elem.style; if ( elemStyle.display != "block" ) { elemStyle.display = "block" } else { elemStyle.display = "none" } return true; } // Make codeblocks hidden by default document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" ) // ]]> </script> </head> <body> <div id="classHeader"> <table class="header-table"> <tr class="top-aligned-row"> <td><strong>Class</strong></td> <td class="class-name-in-header">ActiveRecord::ConnectionAdapters::PostgreSQLAdapter</td> </tr> <tr class="top-aligned-row"> <td><strong>In:</strong></td> <td> <a href="../../../files/lib/active_record/connection_adapters/postgresql_adapter_rb.html"> lib/active_record/connection_adapters/postgresql_adapter.rb </a> <br /> </td> </tr> <tr class="top-aligned-row"> <td><strong>Parent:</strong></td> <td> <a href="AbstractAdapter.html"> AbstractAdapter </a> </td> </tr> </table> </div> <!-- banner header --> <div id="bodyContent"> <div id="contextContent"> <div id="description"> <p> The PostgreSQL adapter works both with the native C (<a href="http://ruby.scripting.ca/postgres">ruby.scripting.ca/postgres</a>/) and the pure Ruby (available both as gem and from <a href="http://rubyforge.org/frs/?group_id=234&release_id=1944">rubyforge.org/frs/?group_id=234&release_id=1944</a>) drivers. </p> <p> Options: </p> <ul> <li><tt>:host</tt> - Defaults to "localhost". </li> <li><tt>:port</tt> - Defaults to 5432. </li> <li><tt>:username</tt> - Defaults to nothing. </li> <li><tt>:password</tt> - Defaults to nothing. </li> <li><tt>:database</tt> - The name of the database. No default, must be provided. </li> <li><tt>:<a href="PostgreSQLAdapter.html#M000313">schema_search_path</a></tt> - An optional schema search path for the connection given as a string of comma-separated schema names. This is backward-compatible with the <tt>:schema_order</tt> option. </li> <li><tt>:<a href="PostgreSQLAdapter.html#M000311">encoding</a></tt> - An optional client <a href="PostgreSQLAdapter.html#M000311">encoding</a> that is used in a <tt>SET client_encoding TO <<a href="PostgreSQLAdapter.html#M000311">encoding</a>></tt> call on the connection. </li> <li><tt>:min_messages</tt> - An optional client min messages that is used in a <tt>SET <a href="PostgreSQLAdapter.html#M000314">client_min_messages</a> TO <min_messages></tt> call on the connection. </li> <li><tt>:allow_concurrency</tt> - If true, use async query methods so Ruby threads don‘t deadlock; otherwise, use blocking query methods. </li> </ul> </div> </div> <div id="method-list"> <h3 class="section-bar">Methods</h3> <div class="name-list"> <a href="#M000283">active?</a> <a href="#M000281">adapter_name</a> <a href="#M000318">add_column</a> <a href="#M000299">begin_db_transaction</a> <a href="#M000319">change_column</a> <a href="#M000320">change_column_default</a> <a href="#M000321">change_column_null</a> <a href="#M000314">client_min_messages</a> <a href="#M000315">client_min_messages=</a> <a href="#M000309">columns</a> <a href="#M000300">commit_db_transaction</a> <a href="#M000306">create_database</a> <a href="#M000303">create_savepoint</a> <a href="#M000310">current_database</a> <a href="#M000285">disconnect!</a> <a href="#M000311">encoding</a> <a href="#M000292">escape_bytea</a> <a href="#M000297">execute</a> <a href="#M000308">indexes</a> <a href="#M000296">insert</a> <a href="#M000282">new</a> <a href="#M000302">outside_transaction?</a> <a href="#M000325">postgresql_version</a> <a href="#M000316">primary_key</a> <a href="#M000294">quote_table_name</a> <a href="#M000284">reconnect!</a> <a href="#M000305">release_savepoint</a> <a href="#M000323">remove_index</a> <a href="#M000322">rename_column</a> <a href="#M000317">rename_table</a> <a href="#M000301">rollback_db_transaction</a> <a href="#M000304">rollback_to_savepoint</a> <a href="#M000313">schema_search_path</a> <a href="#M000312">schema_search_path=</a> <a href="#M000295">select_rows</a> <a href="#M000289">supports_ddl_transactions?</a> <a href="#M000288">supports_insert_with_returning?</a> <a href="#M000286">supports_migrations?</a> <a href="#M000290">supports_savepoints?</a> <a href="#M000287">supports_standard_conforming_strings?</a> <a href="#M000291">table_alias_length</a> <a href="#M000307">tables</a> <a href="#M000324">type_to_sql</a> <a href="#M000293">unescape_bytea</a> <a href="#M000298">update_sql</a> </div> </div> </div> <!-- if includes --> <div id="section"> <div id="constants-list"> <h3 class="section-bar">Constants</h3> <div class="name-list"> <table summary="Constants"> <tr class="top-aligned-row context-row"> <td class="context-item-name">ADAPTER_NAME</td> <td>=</td> <td class="context-item-value">'PostgreSQL'.freeze</td> </tr> <tr class="top-aligned-row context-row"> <td class="context-item-name">NATIVE_DATABASE_TYPES</td> <td>=</td> <td class="context-item-value">{ :primary_key => "serial primary key".freeze, :string => { :name => "character varying", :limit => 255 }, :text => { :name => "text" }, :integer => { :name => "integer" }, :float => { :name => "float" }, :decimal => { :name => "decimal" }, :datetime => { :name => "timestamp" }, :timestamp => { :name => "timestamp" }, :time => { :name => "time" }, :date => { :name => "date" }, :binary => { :name => "bytea" }, :boolean => { :name => "boolean" }, :xml => { :name => "xml" }</td> </tr> </table> </div> </div> <!-- if method_list --> <div id="methods"> <h3 class="section-bar">Public Class methods</h3> <div id="method-M000282" class="method-detail"> <a name="M000282"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000282.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000282.html');return false;"> <span class="method-name">new</span><span class="method-args">(connection, logger, connection_parameters, config)</span> </a> </div> <div class="method-description"> <p> Initializes and connects a PostgreSQL adapter. </p> </div> </div> <h3 class="section-bar">Public Instance methods</h3> <div id="method-M000283" class="method-detail"> <a name="M000283"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000283.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000283.html');return false;"> <span class="method-name">active?</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p> Is this connection alive and ready for queries? </p> </div> </div> <div id="method-M000281" class="method-detail"> <a name="M000281"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000281.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000281.html');return false;"> <span class="method-name">adapter_name</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p> Returns ‘PostgreSQL’ as adapter name for identification purposes. </p> </div> </div> <div id="method-M000318" class="method-detail"> <a name="M000318"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000318.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000318.html');return false;"> <span class="method-name">add_column</span><span class="method-args">(table_name, column_name, type, options = {})</span> </a> </div> <div class="method-description"> <p> Adds a <a href="PostgreSQLAdapter.html#M000282">new</a> column to the named table. See <a href="TableDefinition.html#M000211">TableDefinition#column</a> for details of the options you can use. </p> </div> </div> <div id="method-M000299" class="method-detail"> <a name="M000299"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000299.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000299.html');return false;"> <span class="method-name">begin_db_transaction</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p> Begins a transaction. </p> </div> </div> <div id="method-M000319" class="method-detail"> <a name="M000319"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000319.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000319.html');return false;"> <span class="method-name">change_column</span><span class="method-args">(table_name, column_name, type, options = {})</span> </a> </div> <div class="method-description"> <p> Changes the column of a table. </p> </div> </div> <div id="method-M000320" class="method-detail"> <a name="M000320"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000320.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000320.html');return false;"> <span class="method-name">change_column_default</span><span class="method-args">(table_name, column_name, default)</span> </a> </div> <div class="method-description"> <p> Changes the default value of a table column. </p> </div> </div> <div id="method-M000321" class="method-detail"> <a name="M000321"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000321.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000321.html');return false;"> <span class="method-name">change_column_null</span><span class="method-args">(table_name, column_name, null, default = nil)</span> </a> </div> <div class="method-description"> </div> </div> <div id="method-M000314" class="method-detail"> <a name="M000314"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000314.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000314.html');return false;"> <span class="method-name">client_min_messages</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p> Returns the current client message level. </p> </div> </div> <div id="method-M000315" class="method-detail"> <a name="M000315"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000315.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000315.html');return false;"> <span class="method-name">client_min_messages=</span><span class="method-args">(level)</span> </a> </div> <div class="method-description"> <p> Set the client message level. </p> </div> </div> <div id="method-M000309" class="method-detail"> <a name="M000309"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000309.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000309.html');return false;"> <span class="method-name">columns</span><span class="method-args">(table_name, name = nil)</span> </a> </div> <div class="method-description"> <p> Returns the list of all column definitions for a table. </p> </div> </div> <div id="method-M000300" class="method-detail"> <a name="M000300"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000300.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000300.html');return false;"> <span class="method-name">commit_db_transaction</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p> Commits a transaction. </p> </div> </div> <div id="method-M000306" class="method-detail"> <a name="M000306"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000306.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000306.html');return false;"> <span class="method-name">create_database</span><span class="method-args">(name, options = {})</span> </a> </div> <div class="method-description"> <p> Create a <a href="PostgreSQLAdapter.html#M000282">new</a> PostgreSQL database. Options include <tt>:owner</tt>, <tt>:template</tt>, <tt>:<a href="PostgreSQLAdapter.html#M000311">encoding</a></tt>, <tt>:tablespace</tt>, and <tt>:connection_limit</tt> (note that MySQL uses <tt>:charset</tt> while PostgreSQL uses <tt>:<a href="PostgreSQLAdapter.html#M000311">encoding</a></tt>). </p> <p> Example: </p> <pre> create_database config[:database], config create_database 'foo_development', :encoding => 'unicode' </pre> </div> </div> <div id="method-M000303" class="method-detail"> <a name="M000303"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000303.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000303.html');return false;"> <span class="method-name">create_savepoint</span><span class="method-args">()</span> </a> </div> <div class="method-description"> </div> </div> <div id="method-M000310" class="method-detail"> <a name="M000310"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000310.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000310.html');return false;"> <span class="method-name">current_database</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p> Returns the current database name. </p> </div> </div> <div id="method-M000285" class="method-detail"> <a name="M000285"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000285.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000285.html');return false;"> <span class="method-name">disconnect!</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p> Close the connection. </p> </div> </div> <div id="method-M000311" class="method-detail"> <a name="M000311"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000311.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000311.html');return false;"> <span class="method-name">encoding</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p> Returns the current database <a href="PostgreSQLAdapter.html#M000311">encoding</a> format. </p> </div> </div> <div id="method-M000292" class="method-detail"> <a name="M000292"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000292.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000292.html');return false;"> <span class="method-name">escape_bytea</span><span class="method-args">(value)</span> </a> </div> <div class="method-description"> <p> Escapes binary strings for bytea input to the database. </p> </div> </div> <div id="method-M000297" class="method-detail"> <a name="M000297"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000297.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000297.html');return false;"> <span class="method-name">execute</span><span class="method-args">(sql, name = nil)</span> </a> </div> <div class="method-description"> <p> Executes an SQL statement, returning a <a href="../../PGresult.html">PGresult</a> object on success or raising a PGError exception otherwise. </p> </div> </div> <div id="method-M000308" class="method-detail"> <a name="M000308"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000308.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000308.html');return false;"> <span class="method-name">indexes</span><span class="method-args">(table_name, name = nil)</span> </a> </div> <div class="method-description"> <p> Returns the list of all <a href="PostgreSQLAdapter.html#M000308">indexes</a> for a table. </p> </div> </div> <div id="method-M000296" class="method-detail"> <a name="M000296"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000296.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000296.html');return false;"> <span class="method-name">insert</span><span class="method-args">(sql, name = nil, pk = nil, id_value = nil, sequence_name = nil)</span> </a> </div> <div class="method-description"> <p> Executes an INSERT query and returns the <a href="PostgreSQLAdapter.html#M000282">new</a> record‘s ID </p> </div> </div> <div id="method-M000302" class="method-detail"> <a name="M000302"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000302.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000302.html');return false;"> <span class="method-name">outside_transaction?</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p> The ruby-pg driver supports inspecting the transaction status, while the ruby-postgres driver does not. </p> </div> </div> <div id="method-M000316" class="method-detail"> <a name="M000316"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000316.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000316.html');return false;"> <span class="method-name">primary_key</span><span class="method-args">(table)</span> </a> </div> <div class="method-description"> <p> Returns just a table‘s primary key </p> </div> </div> <div id="method-M000294" class="method-detail"> <a name="M000294"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000294.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000294.html');return false;"> <span class="method-name">quote_table_name</span><span class="method-args">(name)</span> </a> </div> <div class="method-description"> <p> Checks the following cases: </p> <ul> <li>table_name </li> <li>"table.name" </li> <li>schema_name.table_name </li> <li>schema_name."table.name" </li> <li>"schema.name".table_name </li> <li>"schema.name"."table.name" </li> </ul> </div> </div> <div id="method-M000284" class="method-detail"> <a name="M000284"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000284.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000284.html');return false;"> <span class="method-name">reconnect!</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p> Close then reopen the connection. </p> </div> </div> <div id="method-M000305" class="method-detail"> <a name="M000305"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000305.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000305.html');return false;"> <span class="method-name">release_savepoint</span><span class="method-args">()</span> </a> </div> <div class="method-description"> </div> </div> <div id="method-M000323" class="method-detail"> <a name="M000323"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000323.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000323.html');return false;"> <span class="method-name">remove_index</span><span class="method-args">(table_name, options = {})</span> </a> </div> <div class="method-description"> <p> Drops an index from a table. </p> </div> </div> <div id="method-M000322" class="method-detail"> <a name="M000322"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000322.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000322.html');return false;"> <span class="method-name">rename_column</span><span class="method-args">(table_name, column_name, new_column_name)</span> </a> </div> <div class="method-description"> <p> Renames a column in a table. </p> </div> </div> <div id="method-M000317" class="method-detail"> <a name="M000317"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000317.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000317.html');return false;"> <span class="method-name">rename_table</span><span class="method-args">(name, new_name)</span> </a> </div> <div class="method-description"> <p> Renames a table. </p> </div> </div> <div id="method-M000301" class="method-detail"> <a name="M000301"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000301.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000301.html');return false;"> <span class="method-name">rollback_db_transaction</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p> Aborts a transaction. </p> </div> </div> <div id="method-M000304" class="method-detail"> <a name="M000304"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000304.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000304.html');return false;"> <span class="method-name">rollback_to_savepoint</span><span class="method-args">()</span> </a> </div> <div class="method-description"> </div> </div> <div id="method-M000313" class="method-detail"> <a name="M000313"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000313.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000313.html');return false;"> <span class="method-name">schema_search_path</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p> Returns the active schema search path. </p> </div> </div> <div id="method-M000312" class="method-detail"> <a name="M000312"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000312.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000312.html');return false;"> <span class="method-name">schema_search_path=</span><span class="method-args">(schema_csv)</span> </a> </div> <div class="method-description"> <p> Sets the schema search path to a string of comma-separated schema names. Names beginning with $ have to be quoted (e.g. $user => ’$user’). See: <a href="http://www.postgresql.org/docs/current/static/ddl-schemas.html">www.postgresql.org/docs/current/static/ddl-schemas.html</a> </p> <p> This should be not be called manually but set in database.yml. </p> </div> </div> <div id="method-M000295" class="method-detail"> <a name="M000295"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000295.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000295.html');return false;"> <span class="method-name">select_rows</span><span class="method-args">(sql, name = nil)</span> </a> </div> <div class="method-description"> <p> Executes a SELECT query and returns an array of rows. Each row is an array of field values. </p> </div> </div> <div id="method-M000289" class="method-detail"> <a name="M000289"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000289.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000289.html');return false;"> <span class="method-name">supports_ddl_transactions?</span><span class="method-args">()</span> </a> </div> <div class="method-description"> </div> </div> <div id="method-M000288" class="method-detail"> <a name="M000288"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000288.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000288.html');return false;"> <span class="method-name">supports_insert_with_returning?</span><span class="method-args">()</span> </a> </div> <div class="method-description"> </div> </div> <div id="method-M000286" class="method-detail"> <a name="M000286"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000286.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000286.html');return false;"> <span class="method-name">supports_migrations?</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p> Does PostgreSQL support migrations? </p> </div> </div> <div id="method-M000290" class="method-detail"> <a name="M000290"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000290.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000290.html');return false;"> <span class="method-name">supports_savepoints?</span><span class="method-args">()</span> </a> </div> <div class="method-description"> </div> </div> <div id="method-M000287" class="method-detail"> <a name="M000287"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000287.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000287.html');return false;"> <span class="method-name">supports_standard_conforming_strings?</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p> Does PostgreSQL support standard conforming strings? </p> </div> </div> <div id="method-M000291" class="method-detail"> <a name="M000291"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000291.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000291.html');return false;"> <span class="method-name">table_alias_length</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p> Returns the configured supported identifier length supported by PostgreSQL, or report the default of 63 on PostgreSQL 7.x. </p> </div> </div> <div id="method-M000307" class="method-detail"> <a name="M000307"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000307.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000307.html');return false;"> <span class="method-name">tables</span><span class="method-args">(name = nil)</span> </a> </div> <div class="method-description"> <p> Returns the list of all <a href="PostgreSQLAdapter.html#M000307">tables</a> in the schema search path or a specified schema. </p> </div> </div> <div id="method-M000324" class="method-detail"> <a name="M000324"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000324.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000324.html');return false;"> <span class="method-name">type_to_sql</span><span class="method-args">(type, limit = nil, precision = nil, scale = nil)</span> </a> </div> <div class="method-description"> <p> Maps logical Rails types to PostgreSQL-specific data types. </p> </div> </div> <div id="method-M000293" class="method-detail"> <a name="M000293"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000293.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000293.html');return false;"> <span class="method-name">unescape_bytea</span><span class="method-args">(value)</span> </a> </div> <div class="method-description"> <p> Unescapes bytea output from a database to the binary string it represents. NOTE: This is NOT an inverse of escape_bytea! This is only to be used </p> <pre> on escaped binary output from database drive. </pre> </div> </div> <div id="method-M000298" class="method-detail"> <a name="M000298"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000298.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000298.html');return false;"> <span class="method-name">update_sql</span><span class="method-args">(sql, name = nil)</span> </a> </div> <div class="method-description"> <p> Executes an UPDATE query and returns the number of affected tuples. </p> </div> </div> <h3 class="section-bar">Protected Instance methods</h3> <div id="method-M000325" class="method-detail"> <a name="M000325"></a> <div class="method-heading"> <a href="PostgreSQLAdapter.src/M000325.html" target="Code" class="method-signature" onclick="popupCode('PostgreSQLAdapter.src/M000325.html');return false;"> <span class="method-name">postgresql_version</span><span class="method-args">()</span> </a> </div> <div class="method-description"> <p> Returns the version of the connected PostgreSQL version. </p> </div> </div> </div> </div> <div id="validator-badges"> <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p> </div> </body> </html>