PGConnection.this

Opens connection to server.

class PGConnection
this
(
const string[string] params
)

Parameters

params string[string]

Associative array of string keys and values.

Currently recognized parameters are:

  • host - Host name or IP address of the server. Required.
  • port - Port number of the server. Defaults to 5432.
  • user - The database user. Required.
  • database - The database to connect to. Defaults to the user name.
  • options - Command-line arguments for the backend. (This is deprecated in favor of setting individual run-time parameters.)

In addition to the above, any run-time parameter that can be set at backend start time might be listed. Such settings will be applied during backend start (after parsing the command-line options if any). The values will act as session defaults.

Examples

auto conn = new PGConnection([
    "host" : "localhost",
    "database" : "test",
    "user" : "postgres",
    "password" : "postgres"
]);

Meta