Add v3 to changelog

v3-ann
Jack Christensen 2017-06-05 09:11:19 -05:00
parent 784489d998
commit 29c017d750
2 changed files with 61 additions and 93 deletions

View File

@ -1,4 +1,62 @@
# Unreleased
# Unreleased V3
## Changes
* Pid to PID in accordance with Go naming conventions.
* Conn.Pid changed to accessor method Conn.PID()
* Conn.SecretKey removed
* Remove Conn.TxStatus
* Logger interface reduced to single Log method.
* Replace BeginIso with BeginEx. BeginEx adds support for read/write mode and deferrable mode.
* Transaction isolation level constants are now typed strings instead of bare strings.
* Conn.WaitForNotification now takes context.Context instead of time.Duration for cancellation support.
* Conn.WaitForNotification no longer automatically pings internally every 15 seconds.
* ReplicationConn.WaitForReplicationMessage now takes context.Context instead of time.Duration for cancellation support.
* 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
* No longer can read raw bytes of any value into a []byte. Use pgtype.GenericBinary if this functionality is needed.
* Remove CopyTo (functionality is now in CopyFrom)
* OID constants moved from pgx to pgtype package
* Replaced Scanner, Encoder, and PgxScanner interfaces with pgtype system
* Removed ValueReader
* 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.
* Removed Rows.Fatal(error)
* Removed Rows.AfterClose()
* Removed Rows.Conn()
* Removed Tx.AfterClose()
* Removed Tx.Conn()
* Use Go casing convention for OID, UUID, JSON(B), ACLItem, CID, TID, XID, and CIDR
* Replaced stdlib.OpenFromConnPool with DriverConfig system
## Features
* Entirely revamped pluggable type sytem that supports approximately 60 PostgreSQL types.
* Types support database/sql interfaces and therefore can be used with other drivers
* Added context methods supporting cancelation where appropriate
* Added simple query protocol support
* Added single round-trip query mode
* Added batch query operations
* Added OnNotice
* github.com/pkg/errors used where possible for errors
* Added stdlib.DriverConfig which allows directly allows full configuration of underlying pgx connections without needing to use a pgx.ConnPool
* Added AcquireConn and ReleaseConn to stdlib to allow acquiring a connection from a database/sql connection.
# 2.11.0 (June 5, 2017)
## Fixes
* Fix race with concurrent execution of stdlib.OpenFromConnPool (Terin Stock)
## Features
* .pgpass support (j7b)
* Add missing CopyFrom delegators to Tx and ConnPool (Jack Christensen)
* Add ParseConnectionString (James Lawrence)
## Performance
* Optimize HStore encoding (René Kroon)
# 2.10.0 (March 17, 2017)
## Fixes
@ -16,10 +74,12 @@
* Add named error ErrAcquireTimeout (Alexander Staubo)
* Add logical replication decoding (Kris Wehner)
* Add PgxScanner interface to allow types to simultaneously support database/sql and pgx (Jack Christensen)
* Add CopyFrom with schema support (Jack Christensen)
## Compatibility
* jsonb now defaults to binary format. This means passing a []byte to a jsonb column will no longer work.
* CopyTo is now deprecated but will continue to work.
# 2.9.0 (August 26, 2016)

92
v3.md
View File

@ -1,92 +0,0 @@
# V3 Experimental
## Changes
Rename Pid to PID in accordance with Go naming conventions.
Logger interface reduced to single Log method.
Replace BeginIso with BeginEx. BeginEx adds support for read/write mode and deferrable mode.
Transaction isolation level constants are now typed strings instead of bare strings.
Conn.Pid changed to accessor method Conn.PID()
Conn.SecretKey removed
Remove Conn.TxStatus
Added Context methods
Conn.WaitForNotification now takes context.Context instead of time.Duration for cancellation support.
Conn.WaitForNotification no longer automatically pings internally every 15 seconds. (Reconsider this later...)
ReplicationConn.WaitForReplicationMessage now takes context.Context instead of time.Duration for cancellation support.
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
Remove CopyTo
No longer can read raw bytes of any value into a []byte. Use pgtype.GenericBinary if this functionality is needed.
OID constants moved from pgx to pgtype package
Removed ValueReader
Replaced Scanner, Encoder, and PgxScanner interfaces with pgtype system
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.
Removed Rows.Fatal(error)
Removed Rows.AfterClose()
Removed Rows.Conn()
Removed Tx.AfterClose()
Removed Tx.Conn()
Added ctx parameter to (Conn/Tx/ConnPool).PrepareEx
Added batch operations
Use Go casing convention for OID, UUID, JSON(B), ACLItem, CID, TID, XID, and CIDR
Add OnNotice
Use github.com/pkg/errors
## TODO / Possible / Investigate
Organize errors better
Remove circular dependency between Conn and ConnPool such that ConnPool depends on Conn, but Conn doesn't know anything about ConnPool
Or maybe double-down on conn/pool coupling and improve connpool
Add auto-idle pinging to conns in pool
Remove names from prepared statements - use database/sql style objects
Better way of handling text/binary protocol choice than pgx.DefaultTypeFormats or manually editing a PreparedStatement. Possibly an optional part of preparing a statement is specifying the format and/or a decoder. Or maybe it is part of a QueryEx call... Could be very interesting to make encoding and decoding possible without being a method of the type. This could drastically clean up those huge type switches.
Make easier / possible to mock Conn or ConnPool (https://github.com/jackc/pgx/pull/162)
Every field that should not be set by user should be replaced by accessor method (only ones left are Conn.RuntimeParams and Conn.PgTypes)
Investigate strongly typed queries. i.e. Some sort of interface where varargs of Query, Exec, and Scan wouldn't happen. Need to be some low-level interface where (probably generated) functions could (more or less) directly read and write to the connection. Clean code and type-safety / control would be the benefits. Row scanning performance is already so fast there is little to improve (go_db_bench shows under 1 microsecond per row).
Further clean up logging interface -- still some pre-loglevel code in place
Possibly integrate internal logging support with context. Possibly add method that adds arbitrary pgx log data to context. Or add ability to configure what key(s) pgx looks at for additional log context.
Consider whether to switch to logrus style or stick with log15 style logs
Keep ability to change logging while running
consider test to ensure that AssignTo makes copy of reference types
something like:
select array[1,2,3], array[4,5,6,7]
Reconsider synonym types like varchar/text and numeric/decimal.
integrate logging and context - should be able to replace logger via context OR inject params into log from context