Browse Source

Version bump, update changelog; fix readme.

Сергей Прохоров 7 years ago
parent
commit
3cde84bf91
3 changed files with 50 additions and 2 deletions
  1. 48 0
      CHANGES
  2. 1 1
      README.md
  3. 1 1
      src/epgsql.app.src

+ 48 - 0
CHANGES

@@ -1,3 +1,51 @@
+In 4.0.0
+
+Changes:
+
+* Make epgsql commands pluggable  (see pluggable_commands.md).
+  Now we are not limited only by API functions provided by epgsql (equery/squery/prepared_query etc),
+  but may create own commands as a plugins. Still, understanding of PostgreSQL network protocol needed
+  to be able to do so.
+* Make epgsql datatype encoding/decdoding pluggable (see pluggable_types.md).
+  Now we are able to add or tweak codecs for existing as well as custom PostgreSQL
+  datatypes (like datetime, varchar, enum, arrays etc).
+  XXX: Highly recommend to add `{codecs, []}` option to your epgsql:connect/X calls if you don't use
+  PostGIS and hstore datatypes: this will reduce connection setup time.
+* epgsql internals had a huge refactoring (4,000 additions and 1,750 deletions for ~5500 LOC project).
+  Code now is much more modular, documented and have a lot of internal typespecs. Performance
+  improvements are also expected.
+* Now we try to use iolists as much as possible and avoid binary and string concatenations when ever possible.
+  Expect noticeable performance improvements for large BYTEA / TEXT / VARCHAR / JSON / JSONB etc fields.
+* Extended and documented epgsql:with_transaction/3.
+  Now it's possible to preserve original exception's stacktrace, finally!
+* macaddr and macaddr8 datatypes support added
+* Float datatype support was extended with `nan`, `minus_infinity`, `plus_infinity`
+* elvis code style check was added to our travis pipeline
+* Brand-new PostgreSQL 10 scram-sha-256 auth method added
+  (see https://www.postgresql.org/docs/10/static/auth-methods.html#AUTH-PASSWORD and
+  https://www.postgresql.org/docs/current/static/sasl-authentication.html)
+* A lot of typespecs were rewritten and lots of internal typespecs were added
+
+Incompatibilities:
+
+* Some unexpected performance issues may appear, but we expect performance improvements, especially
+  for a large result sets (when a lot of rows are returned by a query) and for large string/json/blob
+  query parameters
+* Undocumented epgsql:update_type_cache/2 API was changed
+* A lot of typespecs were updated. Some typespecs were deprecated or moved from epgsql.erl to other
+  modules. So, some new dialyzer warnings might pop-up
+* Some new error messages might be returned, especially from epgsql:connect/X functions
+* Memory consumption per-connection might slightly grow because we maintain per-connection OID<->codec
+  mapping table, which might be quite big in some cases. This also may produce bigger error_logger
+  reports in case of epgsql connection process crashes.
+* Some exported .hrl files have been changed. #column{} and #statement{} record definitions were extended.
+* PostGIS users might be affected by cleanup of ewkb.erl and epgsql_geometry.hrl
+* Streaming replication users should pay extra attention. No tests were broken, but a lot of
+  modifications were made to this code.
+* Passing integer / atom / float as a value of a text / varchar / bytea query parameter is now
+  deprecated (so, `epgsql:equery(C, "SELECT $1::text", [my_atom])` will still work but is not recommended)
+* Redshift and CockroachDB users might expirience some problems. Please, report bugs!
+
 In 3.4.0
 
 * Use rebar3 as default build and test tool

+ 1 - 1
README.md

@@ -413,7 +413,7 @@ PG type       | Representation
   record      | `{int2, time, text, ...}` (decode only)
   point       |  `{10.2, 100.12}`
   int4range   | `[1,5)`
-  hstore      | `{list({binary(), binary() | null})}`
+  hstore      | `{[ {binary(), binary() \| null} ]}`
   json/jsonb  | `<<"{ \"key\": [ 1, 1.0, true, \"string\" ] }">>`
   uuid        | `<<"123e4567-e89b-12d3-a456-426655440000">>`
   inet        | `inet:ip_address()`

+ 1 - 1
src/epgsql.app.src

@@ -1,6 +1,6 @@
 {application, epgsql,
  [{description, "PostgreSQL Client"},
-  {vsn, "3.4.0"},
+  {vsn, "4.0.0"},
   {modules, []},
   {registered, []},
   {applications, [kernel,