Jack Christensen
18d1ed5ee5
Remove PostgreSQL 9.3 from Travis build matrix
...
PostgreSQL 9.3 is EOL so it doesn't make sense for pgconn to
specifically support. There are no known incompatibilities but it will
not longer be tested.
2019-12-21 14:37:09 -06:00
Jack Christensen
dd53b7488d
Restart signalMessage when receiving non-error message in CopyFrom
...
fixes #21
2019-12-21 11:52:45 -06:00
Jack Christensen
bd0ce203e9
CopyFrom not table test was failing with syntax error
2019-12-21 10:31:27 -06:00
Jack Christensen
32350bd1dc
TestConnectCustomLookup must test with TCP connection
...
Test (correctly) fails if run on a Unix domain socket.
2019-11-18 07:29:57 -06:00
Jack Christensen
eb81d2926b
Ignore errors sending Terminate message while closing connection
...
This mimics the behavior of libpq PGfinish.
refs #637
2019-11-18 07:29:57 -06:00
Jack Christensen
9449f4b081
Merge pull request #17 from skipcloud/sgibson/fix-comment
...
config: fix ValidateConnect comment
2019-10-16 09:21:38 -05:00
Skip Gibson
81b6ad72f6
config: fix ValidateConnect comment
2019-10-16 10:01:16 +01:00
Jack Christensen
4df62cf3d0
Release v1.1.0
2019-10-12 11:23:48 -05:00
Jack Christensen
fcfd7d09a9
Add PgConn.IsBusy() method
2019-10-12 10:21:46 -05:00
Jack Christensen
0077ff0474
Merge pull request #16 from F21/patch-1
...
Fix minor errors and reword some sentences for readability
2019-10-07 13:37:34 -05:00
Francis Chuang
6c195c17b2
Fix minor errors and reword some sentences for readability
2019-10-03 09:49:12 +10:00
Jack Christensen
3f377acc1e
Merge pull request #14 from furdarius/resolve-hostnames-into-addrs
...
Validate all addresses resolved from hostname
2019-09-20 08:51:22 -05:00
Jack Christensen
d6b0287fcd
Release v1.0.1
2019-09-19 21:41:20 -05:00
Jack Christensen
f5eead90fc
Fix statement cache reuse bug
2019-09-19 21:04:14 -05:00
Jack Christensen
bbc7f67a6f
Update to pgproto3 v2.0.0
2019-09-14 20:22:50 -05:00
Jack Christensen
99f22ac8e4
Port DSN parser from pgx v3
...
Original implementation: 2d9d8dc52ac211c6191c08e050c03588aa633038 by
Joshua Barone <joshua.barone@gmail.com>.
Also changed DSN tests to use "dbname" as key rather than "database" as
that is what the PostgreSQL documentation specifies. "database" still
actually works but it should not be encouraged as it is non-standard.
2019-09-14 18:37:33 -05:00
Artemiy Ryabinkov
17d3d592e9
add test for custom lookup func
...
Signed-off-by: Artemiy Ryabinkov <getlag@ya.ru>
2019-09-14 19:11:26 +03:00
Artemiy Ryabinkov
e538885fa7
skip resolve for unix sockets
...
Signed-off-by: Artemiy Ryabinkov <getlag@ya.ru>
2019-09-13 17:52:01 +03:00
Artemiy Ryabinkov
b2ca5d8f52
validate all addresses resolved from hostname
...
Signed-off-by: Artemiy Ryabinkov <getlag@ya.ru>
2019-09-13 17:26:09 +03:00
Artemiy Ryabinkov
51cf0d5480
Merge pull request #2 from jackc/master
...
Sync
2019-09-13 17:20:09 +03:00
Jack Christensen
f8be2b60ce
go.sum changes
2019-09-10 17:25:25 -05:00
Jack Christensen
a8362ef96d
Parse postgresql:// protocol
2019-09-10 17:14:04 -05:00
Jack Christensen
2f6b8f3f56
Fix context timeout on connect
2019-08-31 17:01:54 -05:00
Jack Christensen
2fabfa3c18
Update to newest pgproto3
2019-08-31 15:44:54 -05:00
Jack Christensen
6bba3c4810
Update pgproto3
2019-08-31 11:55:02 -05:00
Jack Christensen
66aaed7c9e
Remove public fields from PgConn
...
- Access TxStatus via method
- Make Config private
fixes #7
2019-08-27 18:11:50 -05:00
Jack Christensen
138254da5b
Refactor errors
...
- Use strongly typed errors internally
- SafeToRetry(error) streamlines retry logic over ErrNoBytesSent
- Timeout(error) removes the need to choose between returning a context
and an i/o error
2019-08-27 18:05:50 -05:00
Jack Christensen
e6cf51b304
Expose min_read_buffer_size config param
2019-08-25 00:22:32 -05:00
Jack Christensen
595d09d6f1
Build fully operational Frontend
2019-08-24 23:57:24 -05:00
Jack Christensen
6feea0c1c5
Replace IsAlive with IsClosed
...
IsAlive is ambiguous because the connection may be dead and we do not
know it. It implies the possibility of a ping. IsClosed is clearer -- it
does not promise the connection is alive only that it hasn't been
closed.
fixes #2
2019-08-24 23:43:26 -05:00
Jack Christensen
da9fc85c44
Rename PreparedStatementDescription to StatementDescription
...
PreparedStatementDescription was too long. It also no longer entirely
represents its purpose now that it is also intended for use with
described statements.
2019-08-24 20:39:03 -05:00
Jack Christensen
78abbdf1d7
Rename LRUCache to LRU
2019-08-24 19:48:43 -05:00
Jack Christensen
bcd6b9244a
Rename pscache to stmtcache
2019-08-24 19:46:14 -05:00
Jack Christensen
beba629bb5
Fix result reader returned by locked conn
2019-08-24 17:18:29 -05:00
Jack Christensen
2209d2e36a
Rename mode constants
2019-08-24 16:27:54 -05:00
Jack Christensen
797a44bf04
Rename BuildFrontendFunc to BuildFrontend
...
For consistency with other functions supplied in Config.
2019-08-24 16:18:04 -05:00
Jack Christensen
e6bd739067
Add pscache package
2019-08-24 16:02:27 -05:00
Jack Christensen
e540a05760
Fix typo in docs
2019-08-24 14:16:38 -05:00
Jack Christensen
760dd75542
Require Config to be created by ParseConfig
2019-08-24 09:28:44 -05:00
Jack Christensen
1558987979
ReceiveMessage returns context error instead of io error on cancel
2019-08-22 20:11:27 -05:00
Jack Christensen
11255efe7a
Make ErrorResponseToPgError public
2019-08-20 15:49:57 -05:00
Jack Christensen
d364370a31
Add SendBytes and ReceiveMessage
2019-08-20 14:12:07 -05:00
Jack Christensen
0a2ed72cf7
Merge pull request #10 from furdarius/configurable-chunkreader-buf
...
Configurable chunkreader buffer size
2019-08-08 15:49:17 -05:00
Artemiy Ryabinkov
c9660e30c8
Use go mod download to install deps on travis-ci. Add cache for travis-ci.
...
Signed-off-by: Artemiy Ryabinkov <getlag@ya.ru>
2019-08-08 13:12:27 +03:00
Artemiy Ryabinkov
dbb7aa8fd5
Add GOPROXY to travis builds to mitigate problems with github and etc
...
Signed-off-by: Artemiy Ryabinkov <getlag@ya.ru>
2019-08-08 12:52:04 +03:00
Artemiy Ryabinkov
0a99b543c0
Add BuildFrontendFunc in Config
...
Signed-off-by: Artemiy Ryabinkov <getlag@ya.ru>
2019-08-08 11:46:25 +03:00
Jack Christensen
f0b479097a
Fix missing deferred constraint violations in certain conditions
...
See https://github.com/jackc/pgx/issues/570 .
2019-08-06 17:07:11 -05:00
Artemiy Ryabinkov
fa7e06489b
Add MinReadBufferSize option to Config
...
Signed-off-by: Artemiy Ryabinkov <getlag@ya.ru>
2019-07-26 11:14:07 +03:00
Artemiy Ryabinkov
b599a26399
Merge pull request #1 from jackc/master
...
Sync
2019-07-26 10:58:16 +03:00
Jack Christensen
3dec184811
Split ValidateConnect from AfterConnect
...
This avoids the foot-gun of ParseConfig setting AfterConnect because of
target_session_attrs and the user inadvertently overriding it with an
AfterConnect designed to setup the connection.
Now target_session_attrs will be handled with ValidateConnect.
2019-07-13 10:22:09 -05:00