2
0
Commit Graph

747 Commits

Author SHA1 Message Date
Jack Christensen 2e4ef2f4fa Fix typo 2017-07-15 08:32:08 -05:00
Jack Christensen 6cb47b91b3 Use insert on conflict for url shortener example
fixes #290
2017-07-14 08:58:41 -05:00
Jack Christensen c5278b8b57 Merge pull request #285 from meowgorithm/master
Add missing `pgx.Identifier` to `CopyFrom` example
2017-07-04 10:48:14 -05:00
Christian Rocha e3248f161e Add missing pgx.Identifier to CopyFrom example 2017-06-30 12:52:24 -04:00
Jack Christensen c4efaf30a2 Fix custom type example
refs #283
2017-06-24 11:37:50 -05:00
Jack Christensen cd16be9308 Close database/sql connections created through ConnPool
database/sql driver created through stdlib.OpenFromConnPool closes connections
when requested by database/sql rather than release to underlying connection
pool.
2017-06-08 19:14:03 -05:00
Jack Christensen 6b2cb6800e Add version notice 2017-06-05 09:15:00 -05:00
Jack Christensen 9bd22f689a Release v2.11.0 2017-06-05 08:57:30 -05:00
Jack Christensen cd0c4c4916 Merge pull request #273 from wttw/master
Add godoc.org badge to README.md
2017-05-09 17:41:34 -05:00
Steve Atkins 1792f01c1e Add godoc.org badge to README.md 2017-05-09 08:24:31 -07:00
Jack Christensen c16671e77e Merge branch 'ReneKroon-master' 2017-04-17 08:44:24 -05:00
René Kroon 1f8262c25c Optimize HStore Encode method 2017-04-16 22:10:43 +02:00
Jack Christensen 136ced3636 Merge pull request #263 from kelseyfrancis/fix-tx-copyfrom-func-sig
Fix Tx CopyFrom signature to take CopyFromSource
2017-04-14 16:15:52 -05:00
Kelsey Francis b9a2373aa5 Fix ConnPool/Tx CopyFrom signature to take CopyFromSource 2017-04-13 13:33:09 -07:00
Jack Christensen b84338d7d6 Update changelog 2017-04-01 08:52:21 -05:00
Jack Christensen fd70293230 Merge branch 'james-lawrence-parse-connection-string' 2017-04-01 08:48:29 -05:00
James Lawrence ef857b600f enable sql.Open to support both DSN and URI based connection strings 2017-03-31 20:09:18 -04:00
Jack Christensen 7bc5af61b8 Update changelog 2017-03-22 08:18:42 -05:00
Jack Christensen cfba8b0836 Merge pull request #249 from terinjokes/terin/mutex-open-from-conn-pool
fix(stdlib): lock openFromConnPoolCount while using
2017-03-22 08:14:21 -05:00
Terin Stock a3e7718743 fix(stdlib): lock openFromConnPoolCount while using
Locks the `openFromConnPoolCount` counter while formatting the driver
name and incrementing to avoid a data race of multiple goroutines
modifying the counter and registering the same name. `sql.Register`
panics if a driver name has already been registered.
2017-03-20 14:20:05 -07:00
Jack Christensen 0a12d7a13a Update changelog 2017-03-17 14:58:40 -05:00
Jack Christensen 7f0993da64 Merge pull request #247 from j7b/master
Support pgpass
2017-03-17 14:56:29 -05:00
Jack Christensen b5bb05877f Add CopyFrom to Tx and ConnPool
fixes #248
2017-03-17 14:35:02 -05:00
j7b 22c850e45d Support pgpass 2017-03-17 16:59:10 +00:00
Jack Christensen 97c01fb524 Update docs for 2.10.0 release 2017-03-17 08:06:00 -05:00
Jack Christensen 2db04c3a02 Add *Conn.CopyFrom
This replaces *Conn.CopyTo. CopyTo was named incorrectly. In PostgreSQL
COPY FROM is the command that copies from the client to the server. In
addition, CopyTo does not accept a schema qualified table name. This
commit introduces the Identifier type which handles multi-part names and
correctly quotes/sanitizes them. The new CopyFrom method uses this
Identifier type.

Conn.CopyTo is deprecated.

refs #243 and #190
2017-03-10 14:25:39 -06:00
Jack Christensen ea4b3ffb14 Remove reference to gopkg.in
It doesn't work with sub-packages and now that Go has vendoring in the standard
build system it is less necessary.

fixes #164
2017-03-02 20:26:00 -06:00
Jack Christensen a52a6bd555 Add PgxScanner interface
Enables types to support database/sql at the same time as pgx.

fixes #232
2017-02-02 20:20:52 -06:00
Jack Christensen 63e482f6bc Update changelog for logical replication 2017-02-02 19:33:03 -06:00
Jack Christensen 0b5a42a6fc Merge branch 'seatme-feature/replication_conn' 2017-02-02 19:30:37 -06:00
Jack Christensen 27b90681e8 Fix find-and-replace errors 2017-02-02 19:30:26 -06:00
Jack Christensen 24265cf352 Merge branch 'feature/replication_conn' of https://github.com/seatme/pgx into seatme-feature/replication_conn 2017-02-02 19:21:24 -06:00
Kris Wehner be5a9a0aff Clean shutdown after the flush lsn check 2017-01-30 14:12:12 -08:00
Kris Wehner 76ac06083e Dont test when you dont have a config 2017-01-30 13:55:18 -08:00
Kris Wehner 86fef0e5d7 go fmt 2017-01-30 11:37:07 -08:00
Kris Wehner 1424fb2b42 Add IdentifySystem and TimelineHistory functions, and tighten up the testing 2017-01-30 11:35:48 -08:00
Kris Wehner 41d9c0f338 Add tests for replication slot drop, and go fmt 2017-01-26 18:24:21 -08:00
Jack Christensen c8080fc4a1 Update travis config 2017-01-24 08:29:46 -06:00
Jack Christensen d398d95764 Explicitly close checked-in connections on ConnPool.Reset 2017-01-23 22:48:17 -06:00
Kris Wehner b2f416c07d Drop replication slot has to run on a live connection, so we'll use the function form for the test. 2017-01-09 14:27:34 -08:00
Kris Wehner af01afca00 Add the drop replication slot functionality 2017-01-09 14:19:08 -08:00
Kris Wehner c88c110169 ReplicationConn refactor 2017-01-09 11:32:02 -08:00
Jack Christensen 6c5b470317 Merge branch 'seatme-master'
* seatme-master:
  Tweak replication test setup
  Properly make it a func init()
  The naming really matters
  Fix the syntax
  Properly make the replication tests skippable on 9.5 and below
  I forgot the tests are 9.6+
  One more try for travis
  Valid YAML helps.
  Dont break old postgres
  Try to fix travis
  Add the ability to set all the fields in the constructor
  Start replication now wraps the sql and returns errors properly
  It should all be unsigned.
  Capitalization
  Add replication stop mechanism
  Add basic logical replication protocol support
2017-01-06 15:04:26 -06:00
Jack Christensen 0ee01e0c4a Tweak replication test setup 2017-01-06 15:04:03 -06:00
Kris Wehner 5584040249 Properly make it a func init() 2017-01-05 12:55:34 -08:00
Kris Wehner d9a80caaad The naming really matters 2017-01-05 12:50:42 -08:00
Kris Wehner 24f06aed9a Fix the syntax 2017-01-05 10:57:49 -08:00
Kris Wehner 69852595d8 Properly make the replication tests skippable on 9.5 and below 2017-01-05 10:25:48 -08:00
Kris Wehner 883e604d0e I forgot the tests are 9.6+ 2017-01-05 10:14:05 -08:00
Kris Wehner c4de74fea2 One more try for travis 2017-01-05 10:04:58 -08:00