PHP 8.4.24 Released!

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

Попередньо визначені константи

Константи, описані нижче — визначені цим драйвером, тож доступні, коли розширення скомпільовано як частина 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

Зауваження: bytea columns are returned as stream resources. See Large Objects (LOBs) for how to read these values and how to bind data with PDO::PARAM_LOB.

Зміст

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top