Skip to content
Search
DSL · Pg query

pgsql_connection

Definition

/**
 * Create connection parameters from a connection string.
 *
 * Accepts libpq-style connection strings:
 * - Key-value format: "host=localhost port=5432 dbname=mydb user=myuser password=secret"
 * - URI format: "postgresql://user:password@localhost:5432/dbname"
 *
 * @example
 * $params = pgsql_connection('host=localhost dbname=mydb');
 * $params = pgsql_connection('postgresql://user:pass@localhost/mydb');
 */
pgsql_connection(string $connectionString) : ConnectionParameters

Contributors

Built in the open.

Join us on GitHub
scroll back to top