1285 Commits

Author SHA1 Message Date
Artemiy Ryabinkov
2837818b67
fix typo
Signed-off-by: Artemiy Ryabinkov <getlag@ya.ru>
2019-06-18 17:09:38 +03:00
Artemiy Ryabinkov
6ec815a748
Support Multiple Hosts in ConnConfig
Signed-off-by: Artemiy Ryabinkov <getlag@ya.ru>
2019-06-18 16:02:09 +03:00
Artemiy Ryabinkov
25e1f674a2
Fix doCancel with addr from networkAddress
Signed-off-by: Artemiy Ryabinkov <getlag@ya.ru>
2019-06-16 14:36:54 +03:00
Artemiy Ryabinkov
9f031bb8f9
Return net.Addr from networkAddress
Signed-off-by: Artemiy Ryabinkov <getlag@ya.ru>
2019-06-16 14:03:43 +03:00
Artemiy Ryabinkov
9538d15c29
Draft of connection writable checking
Signed-off-by: Artemiy Ryabinkov <getlag@ya.ru>
2019-06-03 23:51:48 +03:00
Jack Christensen
9be6a06c27
Merge pull request #536 from coder543/master
Hstore can have empty keys
2019-05-20 16:26:08 -05:00
Josh Leverette
56f4f0b9d3 Hstore can have empty keys 2019-05-20 11:30:25 -07:00
Jack Christensen
8faa4453fc Update changelog for 3.4.0 v3.4.0 2019-05-03 15:52:30 -05:00
Jack Christensen
48df34cc07 Fix inadvertent package doc 2019-05-03 14:23:11 -05:00
Jack Christensen
808ae58103
Merge pull request #529 from x4m/copy
Fix few issues with copy command
2019-05-03 13:57:25 -05:00
Andrey
fbb8ccee58 Fix few issues with copy command 2019-04-28 23:16:54 +05:00
Jack Christensen
25c2375fd8
Merge pull request #528 from kak-tus/dt
Support for pgtype.Date JSON marshal/unmarshal.
2019-04-24 13:12:23 -05:00
Andrey Kuzmin
b4c77819da Use date as date, not datetime.
Marshal/unmarshal date without time part. Date is postgresql type without time.
2019-04-23 21:13:32 +03:00
Andrey Kuzmin
2492eae46c Support for pgtype.Date JSON marshal/unmarshal.
JSON marshalling for types added on a as-needed basis.
Partly closes https://github.com/jackc/pgx/issues/310.
2019-04-22 00:22:22 +03:00
Jack Christensen
53dd8bf77c Travis fix 2019-04-16 21:29:41 -05:00
Jack Christensen
5044e8473a Add SCRAM authentication 2019-04-16 20:46:57 -05:00
Jack Christensen
5c9679850f
Merge pull request #515 from fcelda/replication-allow-query
Allow normal queries on replication connections
2019-04-02 18:46:41 -05:00
Jack Christensen
acfac44499
Merge pull request #523 from fzerorubigd/conn-from-pool
[stdlib] Add support for creating a DB from pgx.Pool
2019-04-02 18:46:01 -05:00
Jan Vcelak
3e82824ff1 Enforce simple protocol on ReplicationConn 2019-04-01 12:51:03 +02:00
fzerorubigd
0b62f832b0
[stdlib] Add support for creating a DB from pgx.Pool
Also the configuration used in the Conn structure (used to implement the
driver.Conn interface) stores a ConnConfig which is used only for determining
if the Connection should be used with Simple Protocol or not.
2019-03-28 16:47:54 +01:00
Jan Vcelak
2e26d8df03 Document simple protocol on ReplicationConn 2019-03-25 13:47:48 +01:00
Jack Christensen
31500c15b3
Merge pull request #521 from lukedirtwalker/removeDeadCode
Remove unreachable code
2019-03-23 12:21:22 -05:00
Jack Christensen
9f05424fdd
Merge pull request #493 from nvorobev/rows-affected-for-copyto-copyfrom
Adds RowsAffected for CopyToWriter and CopyFromReader
2019-03-23 12:17:23 -05:00
Jack Christensen
862dcdf751 Merge branch 'bobheadxi-master' 2019-03-23 11:40:34 -05:00
Jack Christensen
a25c985eba Merge branch 'master' of https://github.com/bobheadxi/pgx into bobheadxi-master 2019-03-23 11:37:16 -05:00
Jack Christensen
038060776b Use LogLevel type instead of int for conn config
Technically, this is a change in the public interface. But it seems
extremely unlikely that it would cause any issues (and any that do
appear would be trivial to fix).

fixes #516
2019-03-23 11:22:47 -05:00
Jan Vcelak
bbe778863f Remove Conn methods on ReplicationConn
Fixes infinite loop when any of the removed methods is called.
2019-03-18 18:52:53 +01:00
Lukas Vogel
03c00d5e41 Remove unreachable code
The returns can never be reached because the loop is guaranteed to return.
2019-03-18 14:20:24 +01:00
Robert Lin
0a8645df19 Remove test 2019-03-11 00:14:06 -07:00
Robert Lin
9a3e403bdf Add rudementary enum transcode test 2019-03-11 00:07:38 -07:00
Robert Lin
e08a188515 Fix enum handling 2019-03-10 23:38:11 -07:00
Jack Christensen
051e69d512
Merge pull request #513 from sidh/issues/495
Fix PreferSimpleProtocol overwrite
2019-03-08 15:27:02 -06:00
Jack Christensen
fb61dbf363
Merge pull request #511 from platelk/master
Close issue #481 : Give access to the registered driver instance
2019-03-08 15:24:58 -06:00
Jan Vcelak
1edfd3b682 Allow normal queries on replication connections
The replication connection allows executing most of the SQL queries
which are available on non-replication connections.
2019-03-07 12:32:46 +01:00
Ilya Sinelnikov
8fe19f698b Fix PreferSimpleProtocol overwrite
https://github.com/jackc/pgx/issues/495
2019-02-28 19:04:35 +03:00
PLATEL Kévin
74ea479b0c Close issue #481 : Give access to the registered driver instance
Some library use a driver to wrap its behavior and give additional
functionality, as the datadog tracing library
("gopkg.in/DataDog/dd-trace-go.v1/contrib/database/sql")

This commit aims to give access to this instance which can't be
correctly initialized to due private fields without default values (the
configuration map inside the driver)
2019-02-05 11:01:22 +01:00
Jack Christensen
6067cfab4f All Write errors are fatal
With TLS connections a Write timeout caused by a SetDeadline permanently
breaks the connection. However, the errors are reported as temporary. So
there is no way to determine if it really is recoverable. As these were
the only kind of Write error that was recovered all Write errors are now
fatal to the connection.

https://github.com/jackc/pgx/issues/494
https://github.com/jackc/pgx/issues/506
https://github.com/golang/go/issues/29971
2019-01-28 22:45:44 -06:00
Jack Christensen
4d2c112042
Merge pull request #504 from phobosxy/err-handle-verbose-oid
Use more detailed error output of unknown field;
2019-01-26 07:36:04 -06:00
Ilya Sivanev
a48ad29c16 Use more detailed error output of unknown field; 2019-01-21 17:51:35 +03:00
Jack Christensen
f4396b2e23
Merge pull request #500 from dgsb/master
support binding of []int type to array integer
2019-01-19 11:43:59 -06:00
Jack Christensen
6b154e2284
Merge pull request #501 from coder543/patch-1
Fix encoding of ErrorResponse
2019-01-19 11:41:23 -06:00
Josh Leverette
3f1d975e4b
Fix encoding of ErrorResponse 2019-01-17 22:19:08 -08:00
David Bariod
0c7a1fc13e support binding of []int type to array integer 2019-01-15 11:01:18 +01:00
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
c59c9cac59 Update changelog for v3.3.0 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