Commit Graph

1348 Commits (77a2da2b4660734d3280fa7a49f50a59d4f884dd)

Author SHA1 Message Date
Jack Christensen 93ee40e691
Merge pull request #436 from ikitiki/fix-config-merge
Mind PreferSimpleProtocol parameter in the config Merge method
2018-07-24 09:53:07 -05:00
Murat Kabilov d9f21d02a5 mind PreferSimpleProtocol parameter in the config Merge method 2018-07-24 16:03:26 +02:00
Jack Christensen b8832c26d4 Fix go vet issue 2018-07-14 11:49:48 -05:00
Jack Christensen 20c02acd63 Fix deadlock when CopyFromSource panics
fixes #433
2018-07-14 11:26:09 -05:00
Jack Christensen 3cbe92ebb5 Merge branch 'james-lawrence-implement-opendb' 2018-07-14 09:58:35 -05:00
Jack Christensen 0a483bad9d Merge branch 'implement-opendb' of https://github.com/james-lawrence/pgx into james-lawrence-implement-opendb 2018-07-14 09:57:49 -05:00
Jack Christensen 39bbc98d99 Do not use same tls.Config for fallback in test 2018-06-08 15:19:56 -05:00
Jack Christensen 31d6f038d3 Merge branch 'dvic-improve-decode-error-msg' 2018-06-08 15:16:41 -05:00
Jack Christensen 368d06ece1 Merge branch 'improve-decode-error-msg' of https://github.com/dvic/pgx into dvic-improve-decode-error-msg 2018-06-08 15:16:09 -05:00
Jack Christensen 7b6f0ffc8c Fix race in TLS tests 2018-06-08 15:14:45 -05:00
Damir Vandic fa045b7a4b Add the type of the value in all decode error messages 2018-06-04 21:02:20 +02:00
Jack Christensen 8707449219 Merge branch 'tarikdemirci-master' 2018-05-17 16:45:46 -05:00
Jack Christensen a6ac63930a Merge branch 'master' of https://github.com/tarikdemirci/pgx into tarikdemirci-master 2018-05-17 16:45:32 -05:00
Jack Christensen e04f5443d5 Fix test with formatting directive 2018-05-17 16:45:01 -05:00
Jack Christensen 6044dcbe21 Fix race in TLS test 2018-05-17 16:43:15 -05:00
Tarik Demirci 1149b0f015
Allow setting nil to pgtype.Bool 2018-05-17 12:22:48 +02:00
Jack Christensen f42b0f65fc Commit and rollbase need not check for failure state 2018-05-12 19:59:12 -05:00
Jack Christensen f114ec85a1 Allow recovery from failed transaction
rollback to savepoint can recover a failed transaction. Therefore we
shouldn't block any activities while the transaction is broken. Instead
we only have the Tx.Status() method return the information.

refs #421
2018-05-12 19:53:53 -05:00
Jack Christensen e096a14b3e Return proper error in Tx.CopyFrom when tx has failed 2018-05-12 10:33:42 -05:00
Jack Christensen 7181a0b52c Use Tx.Status() internally catch failed transactions 2018-05-12 10:32:12 -05:00
Jack Christensen 6f1c5cc3e6 Tx.Status handles in transaction error
refs #421
2018-05-12 10:26:25 -05:00
Jack Christensen 26f6ae2c86
Merge pull request #415 from regeda/numeric_with_uint64
numeric array `AssignTo` supports both types int64 and uint64
2018-04-27 07:54:52 -04:00
Anthony Regeda 88c559bbcd
numeric_with_uint64 numeric array supports both types int64 and uint64 2018-04-24 16:31:31 +03:00
Jack Christensen 1fbd6977e1 Use json instead of jsonb for PG 9.3 compat. 2018-04-14 10:02:08 -05:00
Jack Christensen 8e9b095ce0
Merge pull request #410 from jbowens/acquireconn
stdlib: allow nested database/sql/driver.Drivers
2018-04-14 10:33:26 -04:00
Jack Christensen 5297846239 pgtype.JSON(B).Value now returns []byte
Allows scanning jsonb column into *json.RawMessage.

fixes #409
2018-04-14 09:17:56 -05:00
Jackson Owens 14f1f2aa01 stdlib: allow nested database/sql/driver.Drivers
database/sql/driver.Driver implementations can be nested, with each
layer adding additional functionality. If pgx/stdlib.Driver is wrapped
in another driver.Driver implementation, AcquireConn will error,
detecting that the *sql.DB's driver is not (directly) pgx.Driver.

It looks like it should be possible to support the current functionality
without requiring that the top-level Driver be pgx/stdlib.Driver, but
it requires using a global map of fakeTxConns instead of a per-Driver
map of fakeTxConns.

Is this reasonable?
2018-04-11 19:31:33 -07:00
James Lawrence 19a9154d23 implement driver.Connector 2018-04-08 11:12:15 -04:00
Jack Christensen 6556ef67cb Fix data race in domain handling 2018-04-07 14:26:26 -05:00
Jack Christensen db7df79e10 Add domain support
fixes #407
2018-04-07 14:04:16 -05:00
Jack Christensen b72ebe050f Fix fastpath / largeobjects query counting
fastpath.Call was not incrementing pendingReadyForQueryCount when it
sent a function call. But it was being decremented when the function
call was finished and the server sent the ready for query message. This
caused pendingReadyForQueryCount to go negative. This meant that any
subsequent activity that depended on ensureConnectionReadyForQuery would
not operate correctly because the connection would be considered ready
before it had read all previous data off the wire.

fixes #403
2018-03-31 11:11:48 -05:00
Jack Christensen 8ce528626e
Merge pull request #400 from cheapRoc/f-zerolog
Add zerolog logging adapter
2018-03-24 10:18:36 -05:00
Justin Reagor 5819bc8fb1 Small typo 2018-03-21 00:25:14 -04:00
Justin Reagor 6429fb5bf7 Add github.com/rs/zerolog to Travis 2018-03-20 15:48:19 -04:00
Justin Reagor cb72072f8d Add zerolog logging adapter 2018-03-19 22:40:13 -04:00
Jack Christensen b6bdf5f89b Update changelog 2018-03-17 10:28:34 -05:00
Jack Christensen cb4431028c Fix precision loss for test format geometric types
fixes #399
2018-03-17 10:26:03 -05:00
Jack Christensen a07b87eb8b Skip line test of PG 9.3 2018-03-08 08:05:54 -05:00
Jack Christensen b0c9bbbf71 Update shopspring decimal integration test
New version of shopspring/decimal improves precision. This broke a test.
2018-03-08 07:40:25 -05:00
Jack Christensen b931b56bf6 Document edge case with renamed types
fixes #393
2018-03-03 14:09:49 -06:00
Jack Christensen 55ca9db5d5 Skip test based on missing line type
Instead of explicit server version checking. Ubuntu installed version
string is not parsable by go-version. e.g.

10.2 (Ubuntu 10.2-1.pgdg16.04+1)
2018-02-16 21:39:19 -06:00
Jack Christensen 606697ffdf
Merge pull request #389 from steampunkcoder/FixStartReplicationSyntaxError
Fix syntax error in replication protocol msg issued by StartReplication()
2018-02-05 16:20:27 -06:00
steampunkcoder cba88a4b7d Fix syntax error in replication protocol message issued by StartReplication()
According to https://www.postgresql.org/docs/9.6/static/protocol-replication.html
pluginArguments should be separated by commas and surrounded by parantheses.
2018-02-05 11:12:55 -08:00
Jack Christensen 8cf92b683d Update changelog 2018-02-03 11:44:56 -06:00
Jack Christensen 56a5cb4e5d Merge branch 'sean--scheme-agnostic-uri' 2018-02-03 11:44:09 -06:00
Jack Christensen a487caf45f Merge branch 'scheme-agnostic-uri' of https://github.com/sean-/pgx into sean--scheme-agnostic-uri 2018-02-03 11:43:46 -06:00
Jack Christensen 6925f8dfe6 Update changelog 2018-02-03 11:21:53 -06:00
Jack Christensen f911070f68 Add new SSL config to envvar parsing 2018-02-03 11:20:42 -06:00
Jack Christensen 1c32ce5945 Merge branch 'sean--stdlib-tls' 2018-02-03 11:20:23 -06:00
Jack Christensen 29c6e5234d Merge branch 'stdlib-tls' of https://github.com/sean-/pgx into sean--stdlib-tls 2018-02-03 11:09:59 -06:00