PostgreSQL Functions (PDO_PGSQL)

Introduzione

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

Tipi di risorse

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

Installazione

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

Costanti predefinite

Le costanti qui sotto sono definite da questo driver, e sono disponibili solo quanto l'estensione è stata o compilata nel PHP o caricata dinamicamente a runtime. In aggiunta, queste costanti specifiche del driver dovrebbero essere usate solo se si sta usando il driver stesso. Utilizzare attributi specifici di mysql con il driver postgres può portare a risultati imprevedibili. PDO::getAttribute() può essere usata per ottenere l'attributo PDO_ATTR_DRIVER_NAME per identificare il driver, se il codice può funzionare con driver differenti.

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

Nota:

bytea fields are returned as streams.

Indice dei contenuti

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