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.
Note:
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.
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.
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.
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.
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.