From 8d9eb626098d968941f6ba9ccf2165805ac3a7ef Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Fri, 16 Oct 2015 16:16:39 -0500 Subject: [PATCH] Add docs for relating to ConnConfig.RuntimeParams --- conn.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/conn.go b/conn.go index e5ccfce2..f372ea66 100644 --- a/conn.go +++ b/conn.go @@ -335,6 +335,8 @@ func (c *Conn) Close() (err error) { } // ParseURI parses a database URI into ConnConfig +// +// Query parameters not used by the connection process are parsed into ConnConfig.RuntimeParams. func ParseURI(uri string) (ConnConfig, error) { var cp ConnConfig @@ -387,6 +389,10 @@ var dsn_regexp = regexp.MustCompile(`([a-zA-Z_]+)=((?:"[^"]+")|(?:[^ ]+))`) // // e.g. ParseDSN("user=username password=password host=1.2.3.4 port=5432 dbname=mydb sslmode=disable") // +// Any options not used by the connection process are parsed into ConnConfig.RuntimeParams. +// +// e.g. ParseDSN("application_name=pgxtest search_path=admin user=username password=password host=1.2.3.4 dbname=mydb") +// // ParseDSN tries to match libpq behavior with regard to sslmode. See comments // for ParseEnvLibpq for more information on the security implications of // sslmode options.