Skip to content

Commit ecc9203

Browse files
authored
Merge pull request #2336 from pashagolub/fix-docs-links
fix documentation links
2 parents d2ee746 + 33163ee commit ecc9203

4 files changed

Lines changed: 10 additions & 9 deletions

File tree

pgconn/config.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ func NetworkAddress(host string, port uint16) (network, address string) {
179179
//
180180
// ParseConfig supports specifying multiple hosts in similar manner to libpq. Host and port may include comma separated
181181
// values that will be tried in order. This can be used as part of a high availability system. See
182-
// https://www.postgresql.org/docs/11/libpq-connect.html#LIBPQ-MULTIPLE-HOSTS for more information.
182+
// https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-MULTIPLE-HOSTS for more information.
183183
//
184184
// # Example URL
185185
// postgres://jack:secret@foo.example.com:5432,bar.example.com:5432/mydb
@@ -206,17 +206,17 @@ func NetworkAddress(host string, port uint16) (network, address string) {
206206
// PGTARGETSESSIONATTRS
207207
// PGTZ
208208
//
209-
// See http://www.postgresql.org/docs/11/static/libpq-envars.html for details on the meaning of environment variables.
209+
// See http://www.postgresql.org/docs/current/static/libpq-envars.html for details on the meaning of environment variables.
210210
//
211-
// See https://www.postgresql.org/docs/11/libpq-connect.html#LIBPQ-PARAMKEYWORDS for parameter key word names. They are
211+
// See https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-PARAMKEYWORDS for parameter key word names. They are
212212
// usually but not always the environment variable name downcased and without the "PG" prefix.
213213
//
214214
// Important Security Notes:
215215
//
216216
// ParseConfig tries to match libpq behavior with regard to PGSSLMODE. This includes defaulting to "prefer" behavior if
217217
// not set.
218218
//
219-
// See http://www.postgresql.org/docs/11/static/libpq-ssl.html#LIBPQ-SSL-PROTECTION for details on what level of
219+
// See http://www.postgresql.org/docs/current/static/libpq-ssl.html#LIBPQ-SSL-PROTECTION for details on what level of
220220
// security each sslmode provides.
221221
//
222222
// The sslmode "prefer" (the default), sslmode "allow", and multiple hosts are implemented via the Fallbacks field of
@@ -713,7 +713,7 @@ func configTLS(settings map[string]string, thisHost string, parseConfigOptions P
713713
// According to PostgreSQL documentation, if a root CA file exists,
714714
// the behavior of sslmode=require should be the same as that of verify-ca
715715
//
716-
// See https://www.postgresql.org/docs/12/libpq-ssl.html
716+
// See https://www.postgresql.org/docs/current/libpq-ssl.html
717717
if sslrootcert != "" {
718718
goto nextCase
719719
}

pgconn/errors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func Timeout(err error) bool {
2727
}
2828

2929
// PgError represents an error reported by the PostgreSQL server. See
30-
// http://www.postgresql.org/docs/11/static/protocol-error-fields.html for
30+
// http://www.postgresql.org/docs/current/static/protocol-error-fields.html for
3131
// detailed field description.
3232
type PgError struct {
3333
Severity string

pgconn/pgconn.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ func ConnectWithOptions(ctx context.Context, connString string, parseConfigOptio
135135
//
136136
// If config.Fallbacks are present they will sequentially be tried in case of error establishing network connection. An
137137
// authentication error will terminate the chain of attempts (like libpq:
138-
// https://www.postgresql.org/docs/11/libpq-connect.html#LIBPQ-MULTIPLE-HOSTS) and be returned as the error.
138+
// https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-MULTIPLE-HOSTS) and be returned as the error.
139139
func ConnectConfig(ctx context.Context, config *Config) (*PgConn, error) {
140140
// Default values are set in ParseConfig. Enforce initial creation by ParseConfig rather than setting defaults from
141141
// zero values.
@@ -991,7 +991,8 @@ func noticeResponseToNotice(msg *pgproto3.NoticeResponse) *Notice {
991991

992992
// CancelRequest sends a cancel request to the PostgreSQL server. It returns an error if unable to deliver the cancel
993993
// request, but lack of an error does not ensure that the query was canceled. As specified in the documentation, there
994-
// is no way to be sure a query was canceled. See https://www.postgresql.org/docs/11/protocol-flow.html#id-1.10.5.7.9
994+
// is no way to be sure a query was canceled.
995+
// See https://www.postgresql.org/docs/current/protocol-flow.html#PROTOCOL-FLOW-CANCELING-REQUESTS
995996
func (pgConn *PgConn) CancelRequest(ctx context.Context) error {
996997
// Open a cancellation request to the same server. The address is taken from the net.Conn directly instead of reusing
997998
// the connection config. This is important in high availability configurations where fallback connections may be

pgtype/bool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ func (scanPlanTextAnyToBoolScanner) Scan(src []byte, dst any) error {
328328
return s.ScanBool(Bool{Bool: v, Valid: true})
329329
}
330330

331-
// https://www.postgresql.org/docs/11/datatype-boolean.html
331+
// https://www.postgresql.org/docs/current/datatype-boolean.html
332332
func planTextToBool(src []byte) (bool, error) {
333333
s := string(bytes.ToLower(bytes.TrimSpace(src)))
334334

0 commit comments

Comments
 (0)