Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > d51872cc0e1fdee944d71993f94ac764 > files > 405

ruby-activerecord-2.3.4-1mdv2010.0.noarch.rpm

<?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 &quot;localhost&quot;.

</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 &lt;<a
href="PostgreSQLAdapter.html#M000311">encoding</a>&gt;</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
&lt;min_messages&gt;</tt> call on the connection.

</li>
<li><tt>:allow_concurrency</tt> - If true, use async query methods so Ruby
threads don&#8216;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>&nbsp;&nbsp;
      <a href="#M000281">adapter_name</a>&nbsp;&nbsp;
      <a href="#M000318">add_column</a>&nbsp;&nbsp;
      <a href="#M000299">begin_db_transaction</a>&nbsp;&nbsp;
      <a href="#M000319">change_column</a>&nbsp;&nbsp;
      <a href="#M000320">change_column_default</a>&nbsp;&nbsp;
      <a href="#M000321">change_column_null</a>&nbsp;&nbsp;
      <a href="#M000314">client_min_messages</a>&nbsp;&nbsp;
      <a href="#M000315">client_min_messages=</a>&nbsp;&nbsp;
      <a href="#M000309">columns</a>&nbsp;&nbsp;
      <a href="#M000300">commit_db_transaction</a>&nbsp;&nbsp;
      <a href="#M000306">create_database</a>&nbsp;&nbsp;
      <a href="#M000303">create_savepoint</a>&nbsp;&nbsp;
      <a href="#M000310">current_database</a>&nbsp;&nbsp;
      <a href="#M000285">disconnect!</a>&nbsp;&nbsp;
      <a href="#M000311">encoding</a>&nbsp;&nbsp;
      <a href="#M000292">escape_bytea</a>&nbsp;&nbsp;
      <a href="#M000297">execute</a>&nbsp;&nbsp;
      <a href="#M000308">indexes</a>&nbsp;&nbsp;
      <a href="#M000296">insert</a>&nbsp;&nbsp;
      <a href="#M000282">new</a>&nbsp;&nbsp;
      <a href="#M000302">outside_transaction?</a>&nbsp;&nbsp;
      <a href="#M000325">postgresql_version</a>&nbsp;&nbsp;
      <a href="#M000316">primary_key</a>&nbsp;&nbsp;
      <a href="#M000294">quote_table_name</a>&nbsp;&nbsp;
      <a href="#M000284">reconnect!</a>&nbsp;&nbsp;
      <a href="#M000305">release_savepoint</a>&nbsp;&nbsp;
      <a href="#M000323">remove_index</a>&nbsp;&nbsp;
      <a href="#M000322">rename_column</a>&nbsp;&nbsp;
      <a href="#M000317">rename_table</a>&nbsp;&nbsp;
      <a href="#M000301">rollback_db_transaction</a>&nbsp;&nbsp;
      <a href="#M000304">rollback_to_savepoint</a>&nbsp;&nbsp;
      <a href="#M000313">schema_search_path</a>&nbsp;&nbsp;
      <a href="#M000312">schema_search_path=</a>&nbsp;&nbsp;
      <a href="#M000295">select_rows</a>&nbsp;&nbsp;
      <a href="#M000289">supports_ddl_transactions?</a>&nbsp;&nbsp;
      <a href="#M000288">supports_insert_with_returning?</a>&nbsp;&nbsp;
      <a href="#M000286">supports_migrations?</a>&nbsp;&nbsp;
      <a href="#M000290">supports_savepoints?</a>&nbsp;&nbsp;
      <a href="#M000287">supports_standard_conforming_strings?</a>&nbsp;&nbsp;
      <a href="#M000291">table_alias_length</a>&nbsp;&nbsp;
      <a href="#M000307">tables</a>&nbsp;&nbsp;
      <a href="#M000324">type_to_sql</a>&nbsp;&nbsp;
      <a href="#M000293">unescape_bytea</a>&nbsp;&nbsp;
      <a href="#M000298">update_sql</a>&nbsp;&nbsp;
      </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 =&gt; &quot;serial primary key&quot;.freeze,         :string      =&gt; { :name =&gt; &quot;character varying&quot;, :limit =&gt; 255 },         :text        =&gt; { :name =&gt; &quot;text&quot; },         :integer     =&gt; { :name =&gt; &quot;integer&quot; },         :float       =&gt; { :name =&gt; &quot;float&quot; },         :decimal     =&gt; { :name =&gt; &quot;decimal&quot; },         :datetime    =&gt; { :name =&gt; &quot;timestamp&quot; },         :timestamp   =&gt; { :name =&gt; &quot;timestamp&quot; },         :time        =&gt; { :name =&gt; &quot;time&quot; },         :date        =&gt; { :name =&gt; &quot;date&quot; },         :binary      =&gt; { :name =&gt; &quot;bytea&quot; },         :boolean     =&gt; { :name =&gt; &quot;boolean&quot; },         :xml         =&gt; { :name =&gt; &quot;xml&quot; }</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 &#8216;PostgreSQL&#8217; 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 =&gt; '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&#8216;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&#8216;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>&quot;table.name&quot;

</li>
<li>schema_name.table_name

</li>
<li>schema_name.&quot;table.name&quot;

</li>
<li>&quot;schema.name&quot;.table_name

</li>
<li>&quot;schema.name&quot;.&quot;table.name&quot;

</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 =&gt;
&#8217;$user&#8217;). 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>