This is a modern binding to the mature libpq, the official PostgreSQL C-client library.
This extension is hosted at PECL and can be installed with PEAR's pecl command:
# pecl install pq
Watch out for PECL replicates and pharext packages attached to releases.
git clone github.com:m6w6/ext-pq
cd ext-pq
/path/to/phpize
./configure --with-php-config=/path/to/php-config
make
sudo make install
This extension unconditionally depends on the pre-loaded presence of the following PHP extensions:
It optionally depends on the following extensions:
This extension provides a stub file four your editor's auto-completion.
Download the Stub file:
Fast import/export using COPY.
class pq\COPY
Request cancellation of an asynchronous query.
class pq\Cancel
The connection to the PostgreSQL server.
class pq\Connection
Interface for type conversions.
interface pq\Converter
Declare a cursor.
class pq\Cursor
A simple DateTime
wrapper with predefined formats which supports stringification and JSON.
class pq\DateTime extends DateTime
implements JsonSerializable
A base interface for all pq\Exception classes.
interface pq\Exception
A large object.
class pq\LOB
A query result.
class pq\Result implements Traversable
, Countable
A named prepared statement.
class pq\Statement
A database transaction.
class pq\Transaction
Accessor to the PostgreSQL pg_type
relation.
class pq\Types implements ArrayAccess