|
PDO_PGSQL DSNConnecting to PostgreSQL databases DescriptionThe PDO_PGSQL Data Source Name (DSN) is composed of the following elements, delimited by spaces or semicolons:
Examples
Example #1 PDO_PGSQL DSN examples The following example shows a PDO_PGSQL DSN for connecting to a PostgreSQL database: pgsql:host=localhost;port=5432;dbname=testdb;user=bruce;password=mypass The following example shows a PDO_PGSQL DSN for connecting to a PostgreSQL database via unix socket /tmp/.s.PGSQL.5432: pgsql:host=/tmp;port=5432;dbname=testdb;user=bruce;password=mypass |