* host - The host to connect to. Values that start with / are for unix domain sockets. (default is localhost)
* host - The host to connect to. Values that start with / are for unix
domain sockets. (default is localhost)
* port - The port to bind to. (default is 5432)
* port - The port to bind to. (default is 5432)
* sslmode - Whether or not to use SSL (default is require, this is not the default for libpq)
* sslmode - Whether or not to use SSL (default is require, this is not
the default for libpq)
* fallback_application_name - An application_name to fall back to if one isn't provided.
* fallback_application_name - An application_name to fall back to if one isn't provided.
* connect_timeout - Maximum wait for connection, in seconds. Zero or not specified means wait indefinitely.
* connect_timeout - Maximum wait for connection, in seconds. Zero or
not specified means wait indefinitely.
* sslcert - Cert file location. The file must contain PEM encoded data.
* sslcert - Cert file location. The file must contain PEM encoded data.
* sslkey - Key file location. The file must contain PEM encoded data.
* sslkey - Key file location. The file must contain PEM encoded data.
* sslrootcert - The location of the root certificate file. The file must contain PEM encoded data.
* sslrootcert - The location of the root certificate file. The file
must contain PEM encoded data.
Valid values for sslmode are:
Valid values for sslmode are:
* disable - No SSL
* disable - No SSL
* require - Always SSL (skip verification)
* require - Always SSL (skip verification)
* verify-ca - Always SSL (verify that the certificate presented by the server was signed by a trusted CA)
* verify-ca - Always SSL (verify that the certificate presented by the
* verify-full - Always SSL (verify that the certification presented by the server was signed by a trusted CA and the server host name matches the one in the certificate)
server was signed by a trusted CA)
* verify-full - Always SSL (verify that the certification presented by
the server was signed by a trusted CA and the server host name
matches the one in the certificate)
See http://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING
See http://www.postgresql.org/docs/current/static/libpq-connect.html#LIBPQ-CONNSTRING
for more information about connection string parameters.
for more information about connection string parameters.
...
@@ -68,7 +77,7 @@ Use single quotes for values that contain whitespace:
...
@@ -68,7 +77,7 @@ Use single quotes for values that contain whitespace:
A backslash will escape the next character in values:
A backslash will escape the next character in values:
"user=space\ man password='it\'s valid'
"user=space\ man password='it\'s valid'"
Note that the connection parameter client_encoding (which sets the
Note that the connection parameter client_encoding (which sets the
text encoding for the connection) may be set but must be "UTF8",
text encoding for the connection) may be set but must be "UTF8",
...
@@ -129,7 +138,8 @@ This package returns the following types for values from the PostgreSQL backend:
...
@@ -129,7 +138,8 @@ This package returns the following types for values from the PostgreSQL backend:
- integer types smallint, integer, and bigint are returned as int64
- integer types smallint, integer, and bigint are returned as int64
- floating-point types real and double precision are returned as float64
- floating-point types real and double precision are returned as float64
- character types char, varchar, and text are returned as string
- character types char, varchar, and text are returned as string
- temporal types date, time, timetz, timestamp, and timestamptz are returned as time.Time
- temporal types date, time, timetz, timestamp, and timestamptz are
returned as time.Time
- the boolean type is returned as bool
- the boolean type is returned as bool
- the bytea type is returned as []byte
- the bytea type is returned as []byte
...
@@ -229,7 +239,7 @@ for more information). Note that the channel name will be truncated to 63
...
@@ -229,7 +239,7 @@ for more information). Note that the channel name will be truncated to 63
bytes by the PostgreSQL server.
bytes by the PostgreSQL server.
You can find a complete, working example of Listener usage at
You can find a complete, working example of Listener usage at