PostgreSQL PDO Driver (PDO_PGSQL)
简介
PDO_PGSQL is a driver that implements the PHP Data Objects (PDO) interface to enable access from PHP to PostgreSQL databases.
资源类型
This extension defines a stream resource returned by Pdo\Pgsql::lobOpen().
安装
Use --with-pdo-pgsql[=DIR] to install
the PDO PostgreSQL extension, where the optional [=DIR]
is the PostgreSQL base install directory, or the path to pg_config.
$ ./configure --with-pdo-pgsql
This extension requires libpq (the PostgreSQL C client library). As of PHP 8.4.0, libpq 10.0 or later is required.
预定义常量
下列常量由此驱动定义,且仅在扩展编译入 PHP
或在运行时动态载入时可用。另外,使用此驱动时,仅会使用这些驱动特定的常量。使用其他驱动的驱动特定的常量可能会导致不可预见的情况。如果代码可运行于多个驱动,PDO::getAttribute()
可被用于获取
PDO_ATTR_DRIVER_NAME
属性以检查驱动。
PDO::PGSQL_ATTR_DISABLE_PREPARES
(int)
别名 Pdo\Pgsql::ATTR_DISABLE_PREPARES.
As of PHP 8.5.0, this constant is deprecated.
PDO::PGSQL_TRANSACTION_IDLE
(int)
Equivalent to Pdo\Pgsql::TRANSACTION_IDLE.
As of PHP 8.5.0, this constant is deprecated, as it has no effect.
PDO::PGSQL_TRANSACTION_ACTIVE
(int)
Equivalent to Pdo\Pgsql::TRANSACTION_ACTIVE.
As of PHP 8.5.0, this constant is deprecated, as it has no effect.
PDO::PGSQL_TRANSACTION_INTRANS
(int)
Equivalent to Pdo\Pgsql::TRANSACTION_INTRANS.
As of PHP 8.5.0, this constant is deprecated, as it has no effect.
PDO::PGSQL_TRANSACTION_INERROR
(int)
Equivalent to Pdo\Pgsql::TRANSACTION_INERROR.
As of PHP 8.5.0, this constant is deprecated, as it has no effect.
PDO::PGSQL_TRANSACTION_UNKNOWN
(int)
Equivalent to Pdo\Pgsql::TRANSACTION_UNKNOWN.
As of PHP 8.5.0, this constant is deprecated, as it has no effect.
General notes
注意:
byteacolumns are returned as stream resources. See Large Objects (LOBs) for how to read these values and how to bind data withPDO::PARAM_LOB.
目录
- PDO_PGSQL DSN — Connecting to PostgreSQL databases
- PDO::pgsqlCopyFromArray — 别名 Pdo\Pgsql::copyFromArray
- PDO::pgsqlCopyFromFile — 别名 Pdo\Pgsql::copyFromFile
- PDO::pgsqlCopyToArray — 别名 Pdo\Pgsql::copyToArray
- PDO::pgsqlCopyToFile — 别名 Pdo\Pgsql::copyToFile
- PDO::pgsqlGetNotify — 别名 Pdo\Pgsql::getNotify
- PDO::pgsqlGetPid — 别名 Pdo\Pgsql::getPid
- PDO::pgsqlLOBCreate — 别名 Pdo\Pgsql::lobCreate
- PDO::pgsqlLOBOpen — 别名 Pdo\Pgsql::lobOpen
- PDO::pgsqlLOBUnlink — 别名 Pdo\Pgsql::lobUnlink
来源:PHP Documentation Group · 作者与贡献记录 · CC BY 3.0。离线整理了版式、链接和媒体显示。
