Download the PHP package php-pg/pgconn without Composer

On this page you can find all versions of the php package php-pg/pgconn. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package pgconn

pgconn

Package pgconn is a low-level PostgreSQL database driver. It operates at nearly the same level as the C library libpq. Applications should handle normal queries with a higher level library and only use pgconn directly when needed for low-level access to PostgreSQL functionality.

Connecting

This library follows libpq behavior as much as possible. This means that you can use almost all libpq connection options and both connection string formats.

Supported libpq features:

Using connection string

Read about libpq connection string format 34.1.1. Connection Strings.

Supported connection strings:

Read about supported connection options 34.1.2. Parameter Key Words

By instantiating config manually

API

PgConn is not concurrency safe, it should be used inside a connection pool.

Methods:

Cancelling API calls

Any of API calls can be canceled using AMPHP cancellation objects. \ When cancellation occurs, library sends CancelRequest message to the PostgreSQL server.

But there is an important note from the PostgreSQL Protocol Flow:

The cancellation signal might or might not have any effect — for example, if it arrives after the backend has finished processing the query, then it will have no effect. \ If the cancellation is effective, it results in the current command being terminated early with an error message.

The upshot of all this is that for reasons of both security and efficiency, the frontend has no direct way to tell whether a cancel request has succeeded. \ It must continue to wait for the backend to respond to the query. \ Issuing a cancel simply improves the odds that the current query will finish soon, and improves the odds that it will fail with an error message instead of succeeding.

This means that a Cancellation object may not immediately cancel a running query.

See for more information 53.2.7. Canceling Requests in Progress

Inspired by Golang package jackc/pgconn


All versions of pgconn with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
amphp/amp Version ^v3.0.0
amphp/socket Version ^v2.0.0
php-pg/pgproto3 Version ^v0.0.9
psr/log Version ^3.0
php-pg/pgpassfile Version ^0.0.1
php-pg/pgservicefile Version ^0.0.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package php-pg/pgconn contains the following files

Loading the files please wait ....