341 Commits

Author SHA1 Message Date
Jack Christensen
340bfece2c Do not asyncClose in response to a FATAL PG error
This will reduce spurious server log messages on authentication
failures. See https://github.com/jackc/pgconn/pull/53.
2020-10-29 21:20:28 -05:00
Feike Steenbergen
f3f5b70a87 Ensure the example code snippet compiles again
There were 2 errors when using the example code:

- not enough arguments in call to pgConn.Close
- no new variables on left side of :=

With these changes, the example works again.
2020-10-29 20:49:03 -05:00
Jack Christensen
416f037e77 Fix docs for Timeout 2020-10-05 19:39:05 -05:00
Jack Christensen
035868ca0c Release v1.7.0 2020-09-26 11:39:23 -05:00
Jack Christensen
28d24269e9 Upgrade pgproto3 to v2.0.5 2020-09-26 11:35:23 -05:00
Jack Christensen
be69c1c10b Fix parseDSNSettings with bad backslash
fixes #49
2020-09-10 19:40:52 -05:00
Jack Christensen
b6b3a86310 Update CI Go versions 2020-09-05 13:26:56 -05:00
Jack Christensen
0d4f029683 Exec(Params|Prepared) return ResultReader with FieldDescriptions loaded
Previously, it wasn't loaded until NextRow was called the first time.
2020-09-05 13:14:14 -05:00
Sebastiaan Mannem
5db484908c Changing SendBytesWithResults to ReceiveResults (that only does the reading). 2020-08-22 20:38:04 -05:00
Sebastiaan Mannem
1debbfeec4 Adding SendBytesWithResults option to receive data after sending a message (used by copy-both) 2020-08-22 20:38:04 -05:00
Jack Christensen
fdfc783345 Rename CleanupChan to CleanupDone 2020-08-20 22:08:40 -05:00
Jack Christensen
3eb5432c47 Add PgConn.CleanupChan 2020-08-20 22:00:21 -05:00
Jack Christensen
c894ca8b7d Update pgproto3 to v2.0.4 2020-08-01 05:49:56 -05:00
Jack Christensen
b6e34b44e5 Update pgproto3 2020-07-31 17:04:18 -05:00
Jack Christensen
f45b4d6b76 Release v1.6.4 2020-07-29 22:17:02 -05:00
Jack Christensen
44079b0d2c Fix panic on parsing DSN with trailing '='
Also correctly return error with leading '='.

fixes #47
2020-07-29 22:11:15 -05:00
Jack Christensen
4e4c4ea541 Fix deadlock on error after CommandComplete but before ReadyForQuery
See: https://github.com/jackc/pgx/issues/800
2020-07-29 21:47:23 -05:00
Jack Christensen
37c9edc242 Release v1.6.3 2020-07-22 06:43:39 -05:00
vahid-sohrabloo
271b0ac95e AppendCertsFromPEM doesn't have error and removes pgTLSArgs
AppendCertsFromPEM doesn't have error and removes pgTLSArgs because not used
2020-07-18 08:50:12 -05:00
Jack Christensen
9295bf7483 Update changelog 2020-07-14 12:07:27 -05:00
Jack Christensen
12752ce5d6 Update pgservicefile 2020-07-13 19:34:45 -05:00
Jack Christensen
503c2b445f Release v1.6.1 2020-06-27 11:51:30 -05:00
Jack Christensen
bd7ffdb480 Update golang.org/x/crypto dependency 2020-06-27 11:48:20 -05:00
Jack Christensen
65717779e4 Fix crash when PGSERVICE not found 2020-06-27 11:46:16 -05:00
Jack Christensen
82c2752e71 Update golang.org/x/text to 0.3.3
golang.org/x/text had a vulnerability:

https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-14040

pgconn does not appear to use the affected code path, but it is still
worth updating away from the vulnerable version.

fixes #44
2020-06-27 11:35:23 -05:00
Jack Christensen
473062b114 Remove NewConfig and add more docs for ParseConfig
refs #42
2020-06-27 11:29:21 -05:00
Jack Christensen
7cf5101bb2 Add NewConfig()
refs #42
2020-06-20 12:59:15 -05:00
Jack Christensen
6c16d6c00e
Merge pull request #43 from lukedirtwalker/redactPW
redact passwords in parse config errors
2020-06-13 07:19:15 -05:00
Lukas Vogel
f27e874d55 redact passwords in parse config errors
Redact passwords when printing the parseConfigError in a best effort manner.
This prevents people from leaking the password into logs, if they just print the error in logs.
2020-06-12 13:01:57 +02:00
Jack Christensen
a1b9eb4d4e Fix parseServiceSettings not returning error 2020-06-11 20:55:41 -05:00
Jack Christensen
6b254a445e Fix doc for ParseConfig 2020-06-11 20:51:40 -05:00
Jack Christensen
59a0074b0a Release v1.6.0 2020-06-06 10:52:55 -05:00
Jack Christensen
6cd2127b96 Update pgproto3 dependency 2020-06-06 10:52:07 -05:00
Jack Christensen
fa742c5248
Merge pull request #41 from georgysavva/add-config-copy
Add Config.Copy() method that returns a smart copy of the config.
2020-06-01 13:11:01 -05:00
georgysavva
a6d9265506 Implement deep copy manually, stop using an external deep copy library. Add comment to the Config.Copy() method. 2020-06-01 20:52:08 +03:00
georgysavva
8d541d0004 Add Config.Copy() method that return a smart copy of the config. 2020-06-01 19:20:17 +03:00
Jack Christensen
2647eff567 Fix ValidateConnect with cancelable context
fixes #40
2020-05-25 11:49:37 -05:00
Jack Christensen
8c33aa2443 Remove CPU wasting empty default statement
fixes #39
2020-05-23 11:47:42 -05:00
Jack Christensen
2ccb66fe21 Doc fix 2020-05-16 18:48:05 -05:00
Jack Christensen
18d2604119
Merge pull request #38 from lukedirtwalker/fixIPv6
Handle IPv6 in connection URLs
2020-05-13 08:50:38 -05:00
Jack Christensen
39f9d6079c Merge branch 'georgysavva-improve-connect-timeout' 2020-05-13 07:43:45 -05:00
Jack Christensen
fafefa6063 Merge branch 'improve-connect-timeout' of git://github.com/georgysavva/pgconn into georgysavva-improve-connect-timeout 2020-05-13 07:43:15 -05:00
Jack Christensen
fb54a80edf
Merge pull request #36 from Eun/patch-1
concludeCommand should not throw away fieldDescriptions
2020-05-13 07:38:08 -05:00
Lukas Vogel
08d071c094 Handle IPv6 in connection URLs
Previously IPv6 addresses were wrongly split and lead to a parse error.
This commit fixes the behavior.
2020-05-12 10:39:35 +02:00
Jack Christensen
c4e6445cc7 Explicitly test supported Go and PostgreSQL versions 2020-05-09 10:19:39 -05:00
georgysavva
01a7510ae9 Reformat imports 2020-05-02 16:43:02 +03:00
georgysavva
2d5a17beab Add comment. 2020-05-02 16:39:51 +03:00
georgysavva
391e1ef2ce Parse connect timeout setting into Config. Restrict context timeout via Config.ConnectTimeout on .Connect() call. 2020-05-02 16:35:22 +03:00
Tobias Salzmann
8d9293e1e7
Update pgconn.go 2020-04-30 11:27:01 +02:00
Tobias Salzmann
8f3f335b0f
concludeCommand should not throw away fieldDescriptions 2020-04-30 11:22:43 +02:00