The Pdo\Pgsql class
(PHP 8 >= 8.4.0)
Introduction
A PDO subclass representing a connection using the PostgreSQL PDO driver.
This driver supports a dedicated SQL query parser for the PostgreSQL dialect. It can handle the following:
- Single and double-quoted literals, with doubling as escaping mechanism
- C-style “escape” string literals
- Dollar-quoted string literals
- Two-dashes and C-style comments (non-nested).
- Support for
??as escape sequence for the?operator.
Class synopsis
namespace Pdo;
/* Inherited constants */
/* Constants */
/* Methods */
public Pdo\Pgsql::copyFromArray(
string
array
string
string
?string
): bool
string
$tableName,array
$rows,string
$separator = "\t",string
$nullAs = "\\\\N",?string
$fields = null): bool
public Pdo\Pgsql::copyFromFile(
string
string
string
string
?string
): bool
string
$tableName,string
$filename,string
$separator = "\t",string
$nullAs = "\\\\N",?string
$fields = null): bool
public Pdo\Pgsql::copyToArray(
string
string
string
?string
): array|false
string
$tableName,string
$separator = "\t",string
$nullAs = "\\\\N",?string
$fields = null): array|false
public Pdo\Pgsql::copyToFile(
string
string
string
string
?string
): bool
string
$tableName,string
$filename,string
$separator = "\t",string
$nullAs = "\\\\N",?string
$fields = null): bool
public Pdo\Pgsql::getNotify(int
$fetchMode = PDO::FETCH_DEFAULT, int $timeoutMilliseconds = 0): array|false/* Inherited methods */
public PDO::__construct(
string
?string
#[\SensitiveParameter] ?string
?array
)
string
$dsn,?string
$username = null,#[\SensitiveParameter] ?string
$password = null,?array
$options = null)
public static PDO::connect(
string
?string
#[\SensitiveParameter] ?string
?array
): static
string
$dsn,?string
$username = null,#[\SensitiveParameter] ?string
$password = null,?array
$options = null): static
public PDO::query(string
$query, ?int $fetchMode = PDO::FETCH_COLUMN, int $colno): PDOStatement|falsepublic PDO::query(
string
?int
string
array
): PDOStatement|false
string
$query,?int
$fetchMode = PDO::FETCH_CLASS,string
$classname,array
$constructorArgs): PDOStatement|false
public PDO::query(string
}$query, ?int $fetchMode = PDO::FETCH_INTO, object $object): PDOStatement|falsePredefined Constants
Pdo\Pgsql::ATTR_DISABLE_PREPARES- 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.
Pdo\Pgsql::ATTR_RESULT_MEMORY_SIZE- Returns the amount of memory, in bytes, allocated to the specified query result PDOStatement instance, or
nullif no results exist before the query is executed. Pdo\Pgsql::TRANSACTION_IDLEPdo\Pgsql::TRANSACTION_ACTIVEPdo\Pgsql::TRANSACTION_INTRANSPdo\Pgsql::TRANSACTION_INERRORPdo\Pgsql::TRANSACTION_UNKNOWN
Table of Contents
- Pdo\Pgsql::copyFromArray — Copy data from a PHP array into a table
- Pdo\Pgsql::copyFromFile — Copy data from file into table
- Pdo\Pgsql::copyToArray — Copy data from database table into PHP array
- Pdo\Pgsql::copyToFile — Copy data from table into file
- Pdo\Pgsql::escapeIdentifier — Escapes a string for use as an SQL identifier
- Pdo\Pgsql::getNotify — Get asynchronous notification
- Pdo\Pgsql::getPid — Get the PID of the backend process handling this connection
- Pdo\Pgsql::lobCreate — Creates a new large object
- Pdo\Pgsql::lobOpen — Opens an existing large object stream
- Pdo\Pgsql::lobUnlink — Deletes the large object
- Pdo\Pgsql::setNoticeCallback — Set a callback to handle notice and warning messages generated by the backend
↑ and ↓ to navigate • Enter to select • Esc to close • / to open