(PHP 8 >= 8.4.0)
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.
Nota:
Because this parser recognizes dollar-quoted string literals, question marks inside them are not treated as parameter placeholders and do not need to be escaped. As of PHP 8.4.0, escaping question marks as
??inside a dollar-quoted string is deprecated.
$tableName,$rows,$separator = "\t",$nullAs = "\\\\N",$fields = null$tableName,$filename,$separator = "\t",$nullAs = "\\\\N",$fields = null$tableName,$separator = "\t",$nullAs = "\\\\N",$fields = null$tableName,$filename,$separator = "\t",$nullAs = "\\\\N",$fields = null$fetchMode = PDO::FETCH_DEFAULT, int $timeoutMilliseconds = 0): array|false$dsn,$username = null,$password = null,$options = null$dsn,$username = null,$password = null,$options = null$query, ?int $fetchMode = PDO::FETCH_COLUMN, int $colno): PDOStatement|false$query,$fetchMode = PDO::FETCH_CLASS,$classname,$constructorArgs$query, ?int $fetchMode = PDO::FETCH_INTO, object $object): PDOStatement|falsePdo\Pgsql::ATTR_DISABLE_PREPARESSend 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 null if no results exist before the query is executed.
PDO::ATTR_PREFETCH
As of PHP 8.5.0, setting this attribute to 0 enables
lazy (single-row) fetching: rows are retrieved from the server one at a
time as they are fetched, instead of buffering the whole result set in
memory before the first PDOStatement::fetch()
call. This reduces memory usage for large result sets. Any other value
keeps the default buffered behavior.
It can be set per connection with PDO::setAttribute(), or per statement via the PDO::prepare() or PDO::query() driver options.
In lazy mode, a connection can have only one active statement at a time. Running another statement silently discards any unread rows of the previous one; no error is raised.
Pdo\Pgsql::TRANSACTION_IDLEThis constant has no effect, and is deprecated as of PHP 8.5.0.
Pdo\Pgsql::TRANSACTION_ACTIVEThis constant has no effect, and is deprecated as of PHP 8.5.0.
Pdo\Pgsql::TRANSACTION_INTRANSThis constant has no effect, and is deprecated as of PHP 8.5.0.
Pdo\Pgsql::TRANSACTION_INERRORThis constant has no effect, and is deprecated as of PHP 8.5.0.
Pdo\Pgsql::TRANSACTION_UNKNOWNThis constant has no effect, and is deprecated as of PHP 8.5.0.