PHP 8.3.4 Released!

PostgreSQL Functions (PDO_PGSQL)

Einführung

PDO_PGSQL is a driver that implements the PHP Data Objects (PDO) interface to enable access from PHP to PostgreSQL databases.

Ressource-Typen

This extension defines a stream resource returned by PDO::pgsqlLOBOpen().

Installation

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

Vordefinierte Konstanten

Die folgenden Konstanten werden von diesem Treiber definiert und sind nur verfügbar, wenn die Erweiterung entweder in PHP einkompiliert oder dynamisch zur Laufzeit geladen wurde. Darüber hinaus sind diese Konstanten treiberspezifisch und sollten nur mit diesem Treiber benutzt werden. Treiberspezifische Attribute mit einem anderen Treiber zu nutzen, kann zu unerwarteten Ergebnissen führen. Wenn der Code mit verschiedenen Treibern funktioniert, kann PDO::getAttribute() verwendet werden, um mit PDO::ATTR_DRIVER_NAME den aktuellen Treiber zu ermitteln.

PDO::PGSQL_ATTR_DISABLE_PREPARES (int)

Send the query and the parameters to the server together in a single call, avoiding the need to create a named prepared statement separately. If the query is only going to be executed once this can reduce latency by avoiding an unnecessary server round-trip.

General notes

Hinweis:

bytea fields are returned as streams.

Inhaltsverzeichnis

add a note

User Contributed Notes 1 note

up
-57
rtroy at sciencetools dot com
2 years ago
On Fedora, install the PostgreSql PDO with yum or dnf:

$ dnf install php-pgsql php-pdo_pgsql
To Top