CakeFest 2024: The Official CakePHP Conference

PostgreSQL Functions (PDO_PGSQL)

Introdução

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

Tipos de Recurso

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

Instalação

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

Constantes pré-definidas

As constantes abaixo são definidas por este driver e só estarão disponíveis quando a extensão tiver sido compilada no PHP ou tiver sido carregada dinamicamente em tempo de execução. Além disso, estas constantes específicas do driver só devem ser usadas se este driver estiver sendo usado. Usar atributos específicos de um driver com outro driver pode resultar em comportamento inesperado. PDO::getAttribute() pode ser usada para obter o atributo PDO::ATTR_DRIVER_NAME para verificar o driver, se o código puder ser executado com vários drivers.

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.

Índice

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