(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:
?? as escape sequence for the ? operator. public copyFromArray( string $tableName, array $rows, string $separator = "\t", string $nullAs = "\\\\N", ?string $fields = null ): bool
public copyFromFile( string $tableName, string $filename, string $separator = "\t", string $nullAs = "\\\\N", ?string $fields = null ): bool
public copyToArray( string $tableName, string $separator = "\t", string $nullAs = "\\\\N", ?string $fields = null ): array|false
public copyToFile( string $tableName, string $filename, string $separator = "\t", string $nullAs = "\\\\N", ?string $fields = null ): bool
public escapeIdentifier(string $input): string
public getNotify(int $fetchMode = PDO::FETCH_DEFAULT, int $timeoutMilliseconds = 0): array|false
public getPid(): int
public lobCreate(): string|false
public lobOpen(string $oid, string $mode = "rb"): resource|false
public lobUnlink(string $oid): bool
public setNoticeCallback(?callable $callback): void
$dsn,$username = null,$password = null,$options = nullpublic PDO::beginTransaction(): bool
public PDO::commit(): bool
public static PDO::connect( string $dsn, ?string $username = null, #[\SensitiveParameter] ?string $password = null, ?array $options = null ): static
public PDO::errorCode(): ?string
public PDO::errorInfo(): array
public PDO::exec(string $statement): int|false
public PDO::getAttribute(int $attribute): mixed
public static PDO::getAvailableDrivers(): array
public PDO::inTransaction(): bool
public PDO::lastInsertId(?string $name = null): string|false
public PDO::prepare(string $query, array $options = []): PDOStatement|false
public PDO::query(string $query, ?int $fetchMode = null): PDOStatement|false
public PDO::query(string $query, ?int $fetchMode = PDO::FETCH_COLUMN, int $colno): PDOStatement|false
public PDO::query( 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|false
public PDO::quote(string $string, int $type = PDO::PARAM_STR): string|false
public PDO::rollBack(): bool
public PDO::setAttribute(int $attribute, mixed $value): bool}
Pdo\Pgsql::ATTR_DISABLE_PREPARESPdo\Pgsql::ATTR_RESULT_MEMORY_SIZEnull if no results exist before the query is executed. Pdo\Pgsql::TRANSACTION_IDLEPdo\Pgsql::TRANSACTION_ACTIVEPdo\Pgsql::TRANSACTION_INTRANSPdo\Pgsql::TRANSACTION_INERRORPdo\Pgsql::TRANSACTION_UNKNOWN
© 1997–2025 The PHP Documentation Group
Licensed under the Creative Commons Attribution License v3.0 or later.
https://www.php.net/manual/en/class.pdo-pgsql.php