Connecting to secure cluster from app

It’s not clear how to connect to secure cluster from regular app, written for example in Go.
Usually I specify username and password credential in case of PgSQL, but I see no way to specify certificate from client library. Thanks in advance.

Using the pq package you can put these in the connection string parameters.

See documentation for details https://godoc.org/github.com/lib/pq

Same as libpq I believe.

Thank you for advice!

We know this is a long-standing gap in our docs and have a PR open to finally provide more guidance, although we haven’t covered the Go samples yet: https://github.com/cockroachdb/docs/pull/3271

Feel free to comment on that PR or on the related issue: https://github.com/cockroachdb/docs/issues/631