Jack Christensen
4618730e71
Merge pull request #491 from mialinx/master
...
More precise .pgpass handling
2018-12-15 17:11:13 -06:00
Nikolay Vorobev
a0331e7409
Adds RowsAffected for CopyToWriter and CopyFromReader
2018-12-13 12:54:42 +03:00
Dmitry Smal
af319b2c9a
More precise .pgpass handling
...
* localhost matches unix sockets too
* use OS user as default username
* use username as default database
* ignore comment lines
2018-12-11 11:46:31 +03:00
Jack Christensen
a9a178bc98
Merge branch 'master' into v4-experimental
2018-12-01 11:17:30 -06:00
Jack Christensen
c59c9cac59
Update changelog for v3.3.0
2018-12-01 11:13:13 -06:00
Jack Christensen
b5fee42f0a
Merge pull request #488 from maxarchx/master
...
Apply UUID string length check before parsing
2018-12-01 10:39:47 -06:00
Jack Christensen
f25025a580
Merge pull request #486 from yobert/master
...
Fix two minor grammatical errors in source documentation
2018-12-01 10:38:57 -06:00
Jack Christensen
5ff0ebeec6
Merge pull request #482 from fastest963/retry
...
Added LastStmtSent and use it to retry on errors if statement was not sent
2018-12-01 10:38:10 -06:00
maxarchx
b1a17cf284
Apply UUID string length check before parsing
2018-11-30 15:13:43 +05:00
Joel Jensen
41b714110a
Fix two minor grammatical errors in source documentation
2018-11-27 16:40:46 -07:00
James Hartig
6d336eccb1
Added LastStmtSent and use it to retry on errors if statement was not sent
...
Previously, a failed connection could be put back in a pool and when the
next query was attempted it would fail immediately trying to prepare the
query or reset the deadline. It wasn't clear if the Query or Exec call
could safely be retried since there was no way to know where it failed.
You can now call LastQuerySent and if it returns false then you're
guaranteed that the last call to Query(Ex)/Exec(Ex) didn't get far enough
to attempt to send the query. The call can be retried with a new
connection.
This is used in the stdlib to return a ErrBadConn if a network error
occurred and the statement was not attempted.
Fixes #427
2018-11-19 10:44:40 -05:00
Jack Christensen
d41376dfbc
Error handling ideas
2018-11-17 20:27:20 -06:00
Jack Christensen
21656fbd17
Add context / cancel ideas
2018-11-17 20:24:22 -06:00
Jack Christensen
65e69c5580
Initial base.Connect extraction
2018-11-12 18:08:46 -06:00
Jack Christensen
06fb816b71
Add more notes about v4
2018-11-10 19:44:17 -06:00
Jack Christensen
2e72ca854a
First extraction of base.Conn
2018-11-10 18:48:43 -06:00
Jack Christensen
bd37aaaa6a
Merge pull request #480 from gcurtis/race
...
stdlib: fix race with Driver.configs in Open
2018-11-10 07:56:43 -06:00
Greg Curtis
8b8e883961
stdlib: fix race with Driver.configs in Open
...
The Driver.configs map is protected by configMutex in
registerDriverConfig and unregisterDriverConfig, but not in Open. This
results in a race if Open is called while another goroutine is
registering/unregistering a DriverConfig.
2018-11-10 00:28:05 -08:00
Jack Christensen
670e85136f
Remove Conn.lastActivityTime
...
It was only read in one place and that was an optimization to get the
current time. Replaced that usage with time.Now()
2018-11-09 15:33:31 -06:00
Jack Christensen
a0d2ce5a0e
Merge pull request #477 from fastest963/cancel
...
Added option to customize query cancellation and wait for ready
2018-11-08 19:30:15 -06:00
James Hartig
527f404bbc
Added option to customize query cancellation and wait for ready
...
CockroachDB doesn't support 80877102 and doesn't plan to, so instead allow
the user to customize the cancellation with their own function. In our
function, we call CANCEL QUERY with the query_id based on the LocalAddr().
The WaitForReady method can be used by a pool to not put a connection back
in the pool until it is finished cancelled and ready for a new query.
2018-11-05 20:28:59 -05:00
Jack Christensen
c10ee2b7bf
Merge pull request #473 from Mic92/unix-sockets
...
Add path query parameter to support unix sockets
2018-11-05 18:58:19 -06:00
Jörg Thalheim
3410ad9122
Add host query parameter to support unix sockets
...
Currently there is no way to specify unix sockets in the connection
url. This patch adds a `host` query parameter that allows to set the path.
2018-11-03 21:07:33 +00:00
Jack Christensen
a76c2eb9c8
Merge pull request #476 from tejasmanohar/remove_tls_renegotiation_msg
...
tls: stop sending ssl_renegotiation_limit in startup message
2018-11-03 15:03:23 -05:00
Tejas Manohar
e2010c858c
tls: stop sending ssl_renegotiation_limit in startup message
...
This addresses https://github.com/jackc/pgx/issues/321 with the
fix @jackc proposed there. Redshift users that need to connect
w/ SSL currently fork the library to delete this parameter, e.g.
8e0028d742
And, that's annoying to keep up-to-date :)
2018-10-29 21:50:09 -07:00
Jack Christensen
381a1e8156
Merge pull request #471 from MOZGIII/checked-out-connections
...
Added CheckedOutConnections for ConnPoolStat
2018-10-29 17:27:26 -05:00
Jack Christensen
c047f4dd94
Merge pull request #470 from blind-oracle/master
...
Replication: Add NOEXPORT_SNAPSHOT, GetConnInfo() function
2018-10-29 17:26:01 -05:00
MOZGIII
e4632da034
Added CheckedOutConnections for ConnPoolStat
...
Closes #468
2018-10-23 14:41:21 +03:00
Igor Novgorodov
04bead7c8a
Replication: add NOEXPORT_SNAPSHOT, add GetConnInfo() func
2018-10-23 10:50:34 +02:00
Igor Novgorodov
e49735a0c4
Merge pull request #1 from jackc/master
...
Merge
2018-10-23 10:31:18 +02:00
Jack Christensen
20eaa7963b
Merge pull request #463 from fpetrini/copy_from_reader
...
Handle (n > 0 and err == io.EOF) in CopyFromReader
2018-10-10 07:56:47 -05:00
Fredrik Petrini
c6cec81e2c
Fix: Handle (n > 0 and err == io.EOF) in CopyFromReader as per io.Reader documentation
2018-10-08 11:39:18 +02:00
Jack Christensen
0b00887bf8
Merge pull request #461 from nitsky/master
...
add float types to database/sql ColumnType ScanType()
2018-09-22 15:34:18 -05:00
David Yamnitsky
81dbdeea7a
add float types to database/sql ColumnType ScanType()
2018-09-22 15:15:15 -04:00
Jack Christensen
897e90f353
Type modifier should be int32 not uint32
2018-09-22 07:43:18 -05:00
Jack Christensen
1b754b5f70
Merge pull request #458 from GeertJohan/patch-1
...
Fix undefined identifiers in example
2018-09-22 07:21:15 -05:00
Geert-Johan Riemer
8efdbc9345
Update doc.go
...
Fix undefined identifiers in example
2018-09-17 17:45:08 +02:00
Jack Christensen
655313b801
Merge pull request #456 from tehbrut/hotfix/context_leak
...
Call context.WithTimeout cancel function
2018-09-15 09:47:02 -05:00
Jack Christensen
25098d56f9
Merge pull request #455 from regeda/pool-queue-vs-stack
...
Pool should work like a queue
2018-09-15 09:31:52 -05:00
Valery Krivchikov
1f054a77ea
fix new variables on left side
2018-09-15 14:50:17 +03:00
Valery Krivchikov
0468c97a7e
Fix undefined cancel
2018-09-15 14:27:29 +03:00
Valery Krivchikov
c844a2402b
Call context.WithTimeout cancel function
2018-09-15 13:23:09 +03:00
Anthony Regeda
00d38a68a8
pool-queue-vs-stack pool should work like a queue to traverse all possible connections
2018-09-09 23:22:19 +03:00
Jack Christensen
e44f0f24c4
Merge pull request #454 from regeda/macaddr-array
...
macaddr array is introduced
2018-09-01 22:46:13 -04:00
Jack Christensen
5deea5b971
Convert driver.Valuer's earlier in bind path
...
fixes #449
2018-09-01 21:37:16 -05:00
Jack Christensen
302c74f214
Fix: do not silently ignore assign NULL to *string
...
AssignTo can only assign NULL to a **string. Previous code tried to
assign nil to a *string, which did nothing. Correct behavior is to
detect this as an error.
2018-09-01 18:40:42 -05:00
Anthony Regeda
b0702cf2b1
macaddr-array macaddr array is introduced
2018-09-01 16:06:20 +03:00
Jack Christensen
aa561b8f3c
Merge pull request #438 from ikitiki/text-copy
...
Add CopyFromReader and CopyToWriter methods
2018-08-11 09:25:36 -05:00
Murat Kabilov
4e9a696434
addressing the comments
...
add copy methods to the Tx struct
2018-08-07 23:44:02 +03:00
Jack Christensen
89f1e6ac72
Update changelog
2018-08-07 09:28:28 -05:00