1# 3.3.0 (December 1, 2018) 2 3## Features 4 5* Add CopyFromReader and CopyToWriter (Murat Kabilov) 6* Add MacaddrArray (Anthony Regeda) 7* Add float types to FieldDescription.Type (David Yamnitsky) 8* Add CheckedOutConnections helper method (MOZGIII) 9* Add host query parameter to support Unix sockets (Jörg Thalheim) 10* Custom cancelation hook for use with PostgreSQL-like databases (James Hartig) 11* Added LastStmtSent for safe retry logic (James Hartig) 12 13## Fixes 14 15* Do not silently ignore assign NULL to \*string 16* Fix issue with JSON and driver.Valuer conversion 17* Fix race with stdlib Driver.configs Open (Greg Curtis) 18 19## Changes 20 21* Connection pool uses connections in queue order instead of stack. This 22 minimized the time any connection is idle vs. any other connection. 23 (Anthony Regeda) 24* FieldDescription.Modifier is int32 instead of uint32 25* tls: stop sending ssl_renegotiation_limit in startup message (Tejas Manohar) 26 27# 3.2.0 (August 7, 2018) 28 29## Features 30 31* Support sslkey, sslcert, and sslrootcert URI params (Sean Chittenden) 32* Allow any scheme in ParseURI (for convenience with cockroachdb) (Sean Chittenden) 33* Add support for domain types 34* Add zerolog logging adaptor (Justin Reagor) 35* Add driver.Connector support / Go 1.10 support (James Lawrence) 36* Allow nested database/sql/driver.Drivers (Jackson Owens) 37* Support int64 and uint64 numeric array (Anthony Regeda) 38* Add nul support to pgtype.Bool (Tarik Demirci) 39* Add types to decode error messages (Damir Vandic) 40 41 42## Fixes 43 44* Fix Rows.Values returning same value for multiple columns of same complex type 45* Fix StartReplication() syntax (steampunkcoder) 46* Fix precision loss for test format geometric types 47* Allows scanning jsonb column into `*json.RawMessage` 48* Allow recovery to savepoint in failed transaction 49* Fix deadlock when CopyFromSource panics 50* Include PreferSimpleProtocol in config Merge (Murat Kabilov) 51 52## Changes 53 54* pgtype.JSON(B).Value now returns []byte instead of string. This allows 55 database/sql to scan json(b) into \*json.RawMessage. This is a tiny behavior 56 change, but database/sql Scan should automatically convert []byte to string, so 57 there shouldn't be any incompatibility. 58 59# 3.1.0 (January 15, 2018) 60 61## Features 62 63* Add QueryEx, QueryRowEx, ExecEx, and RollbackEx to Tx 64* Add more ColumnType support (Timothée Peignier) 65* Add UUIDArray type (Kelsey Francis) 66* Add zap log adapter (Kelsey Francis) 67* Add CreateReplicationSlotEx that consistent_point and snapshot_name (Mark Fletcher) 68* Add BeginBatch to Tx (Gaspard Douady) 69* Support CrateDB (Felix Geisendörfer) 70* Allow use of logrus logger with fields configured (André Bierlein) 71* Add array of enum support 72* Add support for bit type 73* Handle timeout parameters (Timothée Peignier) 74* Allow overriding connection info (James Lawrence) 75* Add support for bpchar type (Iurii Krasnoshchok) 76* Add ConnConfig.PreferSimpleProtocol 77 78## Fixes 79 80* Fix numeric EncodeBinary bug (Wei Congrui) 81* Fix logrus updated package name (Damir Vandic) 82* Fix some invalid one round trip execs failing to return non-nil error. (Kelsey Francis) 83* Return ErrClosedPool when Acquire() with closed pool (Mike Graf) 84* Fix decoding row with same type values 85* Always return non-nil \*Rows from Query to fix QueryRow (Kelsey Francis) 86* Fix pgtype types that can Set database/sql/driver.driver.Valuer 87* Prefix types in namespaces other than pg_catalog or public (Kelsey Francis) 88* Fix incomplete selects during batch (Gaspard Douady and Jack Christensen) 89* Support nil pointers to value implementing driver.Valuer 90* Fix time logging for QueryEx 91* Fix ranges with text format where end is unbounded 92* Detect erroneous JSON(B) encoding 93* Fix missing interval mapping 94* ConnPool begin should not retry if ctx is done (Gaspard Douady) 95* Fix reading interrupted messages could break connection 96* Return error on unknown oid while decoding record instead of panic (Iurii Krasnoshchok) 97 98## Changes 99 100* Align sslmode "require" more closely to libpq (Johan Brandhorst) 101 102# 3.0.1 (August 12, 2017) 103 104## Fixes 105 106* Fix compilation on 32-bit platform 107* Fix invalid MarshalJSON of types with status Undefined 108* Fix pid logging 109 110# 3.0.0 (July 24, 2017) 111 112## Changes 113 114* Pid to PID in accordance with Go naming conventions. 115* Conn.Pid changed to accessor method Conn.PID() 116* Conn.SecretKey removed 117* Remove Conn.TxStatus 118* Logger interface reduced to single Log method. 119* Replace BeginIso with BeginEx. BeginEx adds support for read/write mode and deferrable mode. 120* Transaction isolation level constants are now typed strings instead of bare strings. 121* Conn.WaitForNotification now takes context.Context instead of time.Duration for cancellation support. 122* Conn.WaitForNotification no longer automatically pings internally every 15 seconds. 123* ReplicationConn.WaitForReplicationMessage now takes context.Context instead of time.Duration for cancellation support. 124* Reject scanning binary format values into a string (e.g. binary encoded timestamptz to string). See https://github.com/jackc/pgx/issues/219 and https://github.com/jackc/pgx/issues/228 125* No longer can read raw bytes of any value into a []byte. Use pgtype.GenericBinary if this functionality is needed. 126* Remove CopyTo (functionality is now in CopyFrom) 127* OID constants moved from pgx to pgtype package 128* Replaced Scanner, Encoder, and PgxScanner interfaces with pgtype system 129* Removed ValueReader 130* ConnPool.Close no longer waits for all acquired connections to be released. Instead, it immediately closes all available connections, and closes acquired connections when they are released in the same manner as ConnPool.Reset. 131* Removed Rows.Fatal(error) 132* Removed Rows.AfterClose() 133* Removed Rows.Conn() 134* Removed Tx.AfterClose() 135* Removed Tx.Conn() 136* Use Go casing convention for OID, UUID, JSON(B), ACLItem, CID, TID, XID, and CIDR 137* Replaced stdlib.OpenFromConnPool with DriverConfig system 138 139## Features 140 141* Entirely revamped pluggable type system that supports approximately 60 PostgreSQL types. 142* Types support database/sql interfaces and therefore can be used with other drivers 143* Added context methods supporting cancellation where appropriate 144* Added simple query protocol support 145* Added single round-trip query mode 146* Added batch query operations 147* Added OnNotice 148* github.com/pkg/errors used where possible for errors 149* Added stdlib.DriverConfig which directly allows full configuration of underlying pgx connections without needing to use a pgx.ConnPool 150* Added AcquireConn and ReleaseConn to stdlib to allow acquiring a connection from a database/sql connection. 151 152# 2.11.0 (June 5, 2017) 153 154## Fixes 155 156* Fix race with concurrent execution of stdlib.OpenFromConnPool (Terin Stock) 157 158## Features 159 160* .pgpass support (j7b) 161* Add missing CopyFrom delegators to Tx and ConnPool (Jack Christensen) 162* Add ParseConnectionString (James Lawrence) 163 164## Performance 165 166* Optimize HStore encoding (René Kroon) 167 168# 2.10.0 (March 17, 2017) 169 170## Fixes 171 172* database/sql driver created through stdlib.OpenFromConnPool closes connections when requested by database/sql rather than release to underlying connection pool. 173 174# 2.11.0 (June 5, 2017) 175 176## Fixes 177 178* Fix race with concurrent execution of stdlib.OpenFromConnPool (Terin Stock) 179 180## Features 181 182* .pgpass support (j7b) 183* Add missing CopyFrom delegators to Tx and ConnPool (Jack Christensen) 184* Add ParseConnectionString (James Lawrence) 185 186## Performance 187 188* Optimize HStore encoding (René Kroon) 189 190# 2.10.0 (March 17, 2017) 191 192## Fixes 193 194* Oid underlying type changed to uint32, previously it was incorrectly int32 (Manni Wood) 195* Explicitly close checked-in connections on ConnPool.Reset, previously they were closed by GC 196 197## Features 198 199* Add xid type support (Manni Wood) 200* Add cid type support (Manni Wood) 201* Add tid type support (Manni Wood) 202* Add "char" type support (Manni Wood) 203* Add NullOid type (Manni Wood) 204* Add json/jsonb binary support to allow use with CopyTo 205* Add named error ErrAcquireTimeout (Alexander Staubo) 206* Add logical replication decoding (Kris Wehner) 207* Add PgxScanner interface to allow types to simultaneously support database/sql and pgx (Jack Christensen) 208* Add CopyFrom with schema support (Jack Christensen) 209 210## Compatibility 211 212* jsonb now defaults to binary format. This means passing a []byte to a jsonb column will no longer work. 213* CopyTo is now deprecated but will continue to work. 214 215# 2.9.0 (August 26, 2016) 216 217## Fixes 218 219* Fix *ConnPool.Deallocate() not deleting prepared statement from map 220* Fix stdlib not logging unprepared query SQL (Krzysztof Dryś) 221* Fix Rows.Values() with varchar binary format 222* Concurrent ConnPool.Acquire calls with Dialer timeouts now timeout in the expected amount of time (Konstantin Dzreev) 223 224## Features 225 226* Add CopyTo 227* Add PrepareEx 228* Add basic record to []interface{} decoding 229* Encode and decode between all Go and PostgreSQL integer types with bounds checking 230* Decode inet/cidr to net.IP 231* Encode/decode [][]byte to/from bytea[] 232* Encode/decode named types whose underlying types are string, int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64 233 234## Performance 235 236* Substantial reduction in memory allocations 237 238# 2.8.1 (March 24, 2016) 239 240## Features 241 242* Scan accepts nil argument to ignore a column 243 244## Fixes 245 246* Fix compilation on 32-bit architecture 247* Fix Tx.status not being set on error on Commit 248* Fix Listen/Unlisten with special characters 249 250# 2.8.0 (March 18, 2016) 251 252## Fixes 253 254* Fix unrecognized commit failure 255* Fix msgReader.rxMsg bug when msgReader already has error 256* Go float64 can no longer be encoded to a PostgreSQL float4 257* Fix connection corruption when query with error is closed early 258 259## Features 260 261This release adds multiple extension points helpful when wrapping pgx with 262custom application behavior. pgx can now use custom types designed for the 263standard database/sql package such as 264[github.com/shopspring/decimal](https://github.com/shopspring/decimal). 265 266* Add *Tx.AfterClose() hook 267* Add *Tx.Conn() 268* Add *Tx.Status() 269* Add *Tx.Err() 270* Add *Rows.AfterClose() hook 271* Add *Rows.Conn() 272* Add *Conn.SetLogger() to allow changing logger 273* Add *Conn.SetLogLevel() to allow changing log level 274* Add ConnPool.Reset method 275* Add support for database/sql.Scanner and database/sql/driver.Valuer interfaces 276* Rows.Scan errors now include which argument caused error 277* Add Encode() to allow custom Encoders to reuse internal encoding functionality 278* Add Decode() to allow customer Decoders to reuse internal decoding functionality 279* Add ConnPool.Prepare method 280* Add ConnPool.Deallocate method 281* Add Scan to uint32 and uint64 (utrack) 282* Add encode and decode to []uint16, []uint32, and []uint64 (Max Musatov) 283 284## Performance 285 286* []byte skips encoding/decoding 287 288# 2.7.1 (October 26, 2015) 289 290* Disable SSL renegotiation 291 292# 2.7.0 (October 16, 2015) 293 294* Add RuntimeParams to ConnConfig 295* ParseURI extracts RuntimeParams 296* ParseDSN extracts RuntimeParams 297* ParseEnvLibpq extracts PGAPPNAME 298* Prepare is now idempotent 299* Rows.Values now supports oid type 300* ConnPool.Release automatically unlistens connections (Joseph Glanville) 301* Add trace log level 302* Add more efficient log leveling 303* Retry automatically on ConnPool.Begin (Joseph Glanville) 304* Encode from net.IP to inet and cidr 305* Generalize encoding pointer to string to any PostgreSQL type 306* Add UUID encoding from pointer to string (Joseph Glanville) 307* Add null mapping to pointer to pointer (Jonathan Rudenberg) 308* Add JSON and JSONB type support (Joseph Glanville) 309 310# 2.6.0 (September 3, 2015) 311 312* Add inet and cidr type support 313* Add binary decoding to TimestampOid in stdlib driver (Samuel Stauffer) 314* Add support for specifying sslmode in connection strings (Rick Snyder) 315* Allow ConnPool to have MaxConnections of 1 316* Add basic PGSSLMODE to support to ParseEnvLibpq 317* Add fallback TLS config 318* Expose specific error for TSL refused 319* More error details exposed in PgError 320* Support custom dialer (Lewis Marshall) 321 322# 2.5.0 (April 15, 2015) 323 324* Fix stdlib nil support (Blaž Hrastnik) 325* Support custom Scanner not reading entire value 326* Fix empty array scanning (Laurent Debacker) 327* Add ParseDSN (deoxxa) 328* Add timestamp support to NullTime 329* Remove unused text format scanners 330* Return error when too many parameters on Prepare 331* Add Travis CI integration (Jonathan Rudenberg) 332* Large object support (Jonathan Rudenberg) 333* Fix reading null byte arrays (Karl Seguin) 334* Add timestamptz[] support 335* Add timestamp[] support (Karl Seguin) 336* Add bool[] support (Karl Seguin) 337* Allow writing []byte into text and varchar columns without type conversion (Hari Bhaskaran) 338* Fix ConnPool Close panic 339* Add Listen / notify example 340* Reduce memory allocations (Karl Seguin) 341 342# 2.4.0 (October 3, 2014) 343 344* Add per connection oid to name map 345* Add Hstore support (Andy Walker) 346* Move introductory docs to godoc from readme 347* Fix documentation references to TextEncoder and BinaryEncoder 348* Add keep-alive to TCP connections (Andy Walker) 349* Add support for EmptyQueryResponse / Allow no-op Exec (Andy Walker) 350* Allow reading any type into []byte 351* WaitForNotification detects lost connections quicker 352 353# 2.3.0 (September 16, 2014) 354 355* Truncate logged strings and byte slices 356* Extract more error information from PostgreSQL 357* Fix data race with Rows and ConnPool 358