PGConnection.this

Opens connection to server.

class PGConnection
this
(
const string[string] params
)

Parameters

params
Type: 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

1 auto conn = new PGConnection([
2     "host" : "localhost",
3     "database" : "test",
4     "user" : "postgres",
5     "password" : "postgres"
6 ]);

Meta