<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/pdo.drivers.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'en',
  ),
  'this' => 
  array (
    0 => 'ref.pdo-pgsql.php',
    1 => 'PostgreSQL PDO Driver',
    2 => 'PostgreSQL PDO Driver (PDO_PGSQL)',
  ),
  'up' => 
  array (
    0 => 'pdo.drivers.php',
    1 => 'PDO Drivers',
  ),
  'prev' => 
  array (
    0 => 'class.pdo-odbc.php',
    1 => 'Pdo\\Odbc',
  ),
  'next' => 
  array (
    0 => 'ref.pdo-pgsql.connection.php',
    1 => 'PDO_PGSQL DSN',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/pdo_pgsql/reference.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/ref.pdo-pgsql.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="ref.pdo-pgsql" class="reference">
  
  <h1 class="title">PostgreSQL PDO Driver (PDO_PGSQL)</h1>
  
  <div class="partintro">

   <div class="section" id="ref.pdo-pgsql.intro">
   <h2 class="title">Introduction</h2>
    <p class="para">
     PDO_PGSQL is a driver that implements the <a href="book.pdo.php#intro.pdo" class="link">PHP
     Data Objects (PDO) interface</a>
     to enable access from PHP to PostgreSQL databases.
    </p>
   </div>

   <div class="section" id="ref.pdo-pgsql.resources">
    <h2 class="title">Resource Types</h2>
    <p class="simpara">
     This extension defines a stream resource returned by
     <span class="methodname"><a href="pdo-pgsql.lobopen.php" class="methodname">Pdo\Pgsql::lobOpen()</a></span>.
    </p>
   </div>

   

<div class="section" id="ref.pdo-pgsql.installation">
 <h2 class="title">Installation</h2>
 <p class="para">
  Use <strong class="option configure">--with-pdo-pgsql[=DIR]</strong> to install
  the PDO PostgreSQL extension, where the optional <code class="literal">[=DIR]</code>
  is the PostgreSQL base install directory, or the path to <em>pg_config</em>.
  <div class="example-contents screen">
<div class="cdata"><pre>
$ ./configure --with-pdo-pgsql
</pre></div>
  </div>
 </p>
</div>



   

<div class="section" id="ref.pdo-pgsql.constants">
 <h2 class="title">Predefined Constants</h2>
 <p class="simpara">The constants below are defined by
this driver, and will only be available when the extension has been either
compiled into PHP or dynamically loaded at runtime. In addition, these
driver-specific constants should only be used if you are using this driver.
Using driver-specific attributes with another driver may result in
unexpected behaviour. <span class="function"><a href="pdo.getattribute.php" class="function">PDO::getAttribute()</a></span> may be used to
obtain the <strong><code><a href="pdo.constants.php#pdo.constants.attr-driver-name">PDO::ATTR_DRIVER_NAME</a></code></strong> attribute to check the
driver, if your code can run against multiple drivers.</p>
 <dl>
  
   <dt id="pdo.constants.pgsql-attr-disable-prepares">
    <strong><code><a href="ref.pdo-pgsql.php#pdo.constants.pgsql-attr-disable-prepares">PDO::PGSQL_ATTR_DISABLE_PREPARES</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     Alias of <strong><code><a href="class.pdo-pgsql.php#pdo-pgsql.constants.attr-disable-prepares">Pdo\Pgsql::ATTR_DISABLE_PREPARES</a></code></strong>.
     As of PHP 8.5.0, this constant is deprecated.
    </span>
   </dd>
  
  
   <dt id="pdo.constants.pgsql-transaction-idle">
    <strong><code><a href="ref.pdo-pgsql.php#pdo.constants.pgsql-transaction-idle">PDO::PGSQL_TRANSACTION_IDLE</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     Equivalent to <strong><code><a href="class.pdo-pgsql.php#pdo-pgsql.constants.transaction-idle">Pdo\Pgsql::TRANSACTION_IDLE</a></code></strong>.
     As of PHP 8.5.0, this constant is deprecated, as it has no effect.
    </span>
   </dd>
  
  
   <dt id="pdo.constants.pgsql-transaction-active">
    <strong><code><a href="ref.pdo-pgsql.php#pdo.constants.pgsql-transaction-active">PDO::PGSQL_TRANSACTION_ACTIVE</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     Equivalent to <strong><code><a href="class.pdo-pgsql.php#pdo-pgsql.constants.transaction-active">Pdo\Pgsql::TRANSACTION_ACTIVE</a></code></strong>.
     As of PHP 8.5.0, this constant is deprecated, as it has no effect.
    </span>
   </dd>
  
  
   <dt id="pdo.constants.pgsql-transaction-intrans">
    <strong><code><a href="ref.pdo-pgsql.php#pdo.constants.pgsql-transaction-intrans">PDO::PGSQL_TRANSACTION_INTRANS</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     Equivalent to <strong><code><a href="class.pdo-pgsql.php#pdo-pgsql.constants.transaction-intrans">Pdo\Pgsql::TRANSACTION_INTRANS</a></code></strong>.
     As of PHP 8.5.0, this constant is deprecated, as it has no effect.
    </span>
   </dd>
  
  
   <dt id="pdo.constants.pgsql-transaction-inerror">
    <strong><code><a href="ref.pdo-pgsql.php#pdo.constants.pgsql-transaction-inerror">PDO::PGSQL_TRANSACTION_INERROR</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     Equivalent to <strong><code><a href="class.pdo-pgsql.php#pdo-pgsql.constants.transaction-inerror">Pdo\Pgsql::TRANSACTION_INERROR</a></code></strong>.
     As of PHP 8.5.0, this constant is deprecated, as it has no effect.
    </span>
   </dd>
  
  
   <dt id="pdo.constants.pgsql-transaction-unknown">
    <strong><code><a href="ref.pdo-pgsql.php#pdo.constants.pgsql-transaction-unknown">PDO::PGSQL_TRANSACTION_UNKNOWN</a></code></strong>
     (<span class="type"><a href="language.types.integer.php" class="type int">int</a></span>)
   </dt>
   <dd>
    <span class="simpara">
     Equivalent to <strong><code><a href="class.pdo-pgsql.php#pdo-pgsql.constants.transaction-unknown">Pdo\Pgsql::TRANSACTION_UNKNOWN</a></code></strong>.
     As of PHP 8.5.0, this constant is deprecated, as it has no effect.
    </span>
   </dd>
  
 </dl>
</div>




   <div class="section" id="ref.pdo-pgsql.general-notes">
    <h2 class="title">General notes</h2>
    <blockquote class="note"><p><strong class="note">Note</strong>: 
     <span class="simpara">
      <code class="literal">bytea</code> columns are returned as stream resources. See
      <a href="pdo.lobs.php" class="link">Large Objects (LOBs)</a> for how to read these
      values and how to bind data with <strong><code><a href="pdo.constants.php#pdo.constants.param-lob">PDO::PARAM_LOB</a></code></strong>.
     </span>
    </p></blockquote>
   </div>

  </div>

  

  













































 <h2>Table of Contents</h2><ul class="chunklist chunklist_reference"><li><a href="ref.pdo-pgsql.connection.php">PDO_PGSQL DSN</a> — Connecting to PostgreSQL databases</li><li><a href="pdo.pgsqlcopyfromarray.php">PDO::pgsqlCopyFromArray</a> — Alias of Pdo\Pgsql::copyFromArray</li><li><a href="pdo.pgsqlcopyfromfile.php">PDO::pgsqlCopyFromFile</a> — Alias of Pdo\Pgsql::copyFromFile</li><li><a href="pdo.pgsqlcopytoarray.php">PDO::pgsqlCopyToArray</a> — Alias of Pdo\Pgsql::copyToArray</li><li><a href="pdo.pgsqlcopytofile.php">PDO::pgsqlCopyToFile</a> — Alias of Pdo\Pgsql::copyToFile</li><li><a href="pdo.pgsqlgetnotify.php">PDO::pgsqlGetNotify</a> — Alias of Pdo\Pgsql::getNotify</li><li><a href="pdo.pgsqlgetpid.php">PDO::pgsqlGetPid</a> — Alias of Pdo\Pgsql::getPid</li><li><a href="pdo.pgsqllobcreate.php">PDO::pgsqlLOBCreate</a> — Alias of Pdo\Pgsql::lobCreate</li><li><a href="pdo.pgsqllobopen.php">PDO::pgsqlLOBOpen</a> — Alias of Pdo\Pgsql::lobOpen</li><li><a href="pdo.pgsqllobunlink.php">PDO::pgsqlLOBUnlink</a> — Alias of Pdo\Pgsql::lobUnlink</li></ul>
</div>
<?php manual_footer($setup); ?>