The php Function Pg_Pconnect
The php function pg_pconnect connects your PHP program to the PostgreSQL database. This allows you to create and display data in a variety of ways. It’s also useful for transferring information from one server to another. You can find out how to use this function in our article about connecting a postgreSQL database in PHP.
php_pconnect() opens a connection to a PostgreSQL database specified by the connection_string. The connection_string can contain parameter settings separated by whitespace in the form of keyword = value, or the string can be empty to use all default values. Single quotes and backslashes within the value must be escaped, e.g., keyword = 'a value'. Currently recognized parameter settings are host, hostaddr, port, dbname (defaults to value of user), username, password, connect_timeout, options, tty (ignored), sslmode, requiressl, and service.
If PGSQL_CONNECT_FORCE_NEW is passed, then a new connection is created, even if the connection_string is identical to an existing one. This behavior is optional; if not used, the same connection as an earlier call to pg_pconnect() will continue to be used.
As part of the Resource to Object migration in PHP 8.1, all functions from the PostgreSQL extension that previously returned or accepted a pgsql link resource now return a