CHANGES 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. In 4.4.0
  2. * Guards are now added to avoid silent integer truncation for numeric and
  3. numeric range datatype codecs. So, an attempt to encode 100000 as `int2`
  4. will now crash the connection instead of silently truncating it. #218
  5. * `epgsql{a,i}:cancel/1` API was documented. #224
  6. * Version of `execute_batch` that uses the same SQL query for each request
  7. in a batch. Very convenient for batch-inserts. #209
  8. * It's now possible to provide `#statement{}` to `prepared_query/3`. This way
  9. of calling it eliminates extra `describe` round-trip thus making it more
  10. efficient. #207
  11. * Representation of SQL `NULL` is now fully configurable. You can choose what
  12. set of Erlang terms should be interpreted as `NULL` and which term to use to
  13. represent `NULL`s received from database. #212
  14. * It's now possible to choose between 3 representations of a `hstore` datatype:
  15. map(), jiffy-style objects (default) and proplist. It can also take `map()` as
  16. input now. NULL value representation is also configurable. #217
  17. * Edocs build was fixed. Just run `rebar3 edoc` and reference documentation for
  18. all modules will be generated. But it's considered to be more "internal"
  19. documentation for those who want to learn more about epgsql internals or
  20. to do some hacking. It complements, but not replaces README. #214
  21. * `epgsql:connect` `timeout` option is more strict now - it limits TCP and SSL
  22. setup time as a whole. #223
  23. * Test coverage report was enabled in CI. We will fail the build if coverage
  24. falls below 55%. We hope to improve this metric over time. #208
  25. * We now send `Terminate` message to the server when doing graceful connection
  26. shutdown (as recommended by protocol). #219
  27. * We found that `describe(_, portal, _)` API was broken since release v4.0.0, but
  28. was not covered by tests. So now it was fixed and tests were added. #211
  29. * Error code to error name conversion code was updated (see `#error.codename`).
  30. Some new codes were added (mostly related to JSON datatypes) and one has changed.
  31. So, if you were matching over `#error.codename` being
  32. `invalid_preceding_following_size` you have to update your code. #210
  33. * `#column{}` record is now fully documented. It was extended to
  34. include `table_oid` and `table_attr_number` fields which point to the originating
  35. database table of this column (if any). #205
  36. * Extended timerange datatype support #204
  37. * Some minor typos, datatype and CI fixes #199 #201 #206 #221
  38. In 4.3.0
  39. * Erlang 22 compatibility is tested; support for Erlang 17 was dropped. Last
  40. version that supports Erlang 17 is 4.2.1 (#195)
  41. * Fixed some corner-case bug in streaming replication (#181)
  42. * It's now possible to set-up JSON encoder/decoder callback for json/jsonb
  43. datatypes (#197)
  44. * Performance micro-optimizations on hot paths (#177)
  45. * Use PostgreSQL 10 for Travis tests (#195)
  46. * Improved connection error handling (#183)
  47. * TLS certificates used in tests had expired (epgsql project is more than
  48. 10 years old!), so, new ones were created (#187)
  49. * Some typespecs fixed
  50. In 4.2.1
  51. * Bug fix for `epgsql:connect(proplist())`
  52. In 4.2.0
  53. * Support for R16 was completely dropped. Maps are now used internally instead of proplists
  54. * Nested `record` datatype decoding bug, introduced in 4.0.0, was fixed
  55. * Added tsrange, tstzrange, daterange types
  56. * Passwords are obfuscated before they sent to connection process. This is to avoid plain
  57. DB passwords to be dumped to SASL crash log
  58. * Password can be provided as a fun: `fun ( () -> iodata() )`
  59. * `platform_define` macroses were simplified. It's now possible to build epgsql even without
  60. rebar on all supported OTP versions
  61. In 4.1.0
  62. * Fix Erlang 21 `get_stacktrace/0` warnings
  63. * Fix broken backward-compatibility in `bpchar` datatype
  64. * Fix compatibility issues between the newest rebar3 and Erlang R16
  65. In 4.0.1
  66. * Minor build bug fixed
  67. In 4.0.0
  68. Changes:
  69. * Make epgsql commands pluggable (see pluggable_commands.md).
  70. Now we are not limited only by API functions provided by epgsql (equery/squery/prepared_query etc),
  71. but may create own commands as a plugins. Still, understanding of PostgreSQL network protocol needed
  72. to be able to do so.
  73. * Make epgsql datatype encoding/decdoding pluggable (see pluggable_types.md).
  74. Now we are able to add or tweak codecs for existing as well as custom PostgreSQL
  75. datatypes (like datetime, varchar, enum, arrays etc).
  76. XXX: Highly recommend to add `{codecs, []}` option to your epgsql:connect/X calls if you don't use
  77. PostGIS and hstore datatypes: this will reduce connection setup time.
  78. * epgsql internals had a huge refactoring (4,000 additions and 1,750 deletions for ~5500 LOC project).
  79. Code now is much more modular, documented and have a lot of internal typespecs. Performance
  80. improvements are also expected.
  81. * Now we try to use iolists as much as possible and avoid binary and string concatenations when ever possible.
  82. Expect noticeable performance improvements for large BYTEA / TEXT / VARCHAR / JSON / JSONB etc fields.
  83. * Extended and documented epgsql:with_transaction/3.
  84. Now it's possible to preserve original exception's stacktrace, finally!
  85. * macaddr and macaddr8 datatypes support added
  86. * Float datatype support was extended with `nan`, `minus_infinity`, `plus_infinity`
  87. * elvis code style check was added to our travis pipeline
  88. * Brand-new PostgreSQL 10 scram-sha-256 auth method added
  89. (see https://www.postgresql.org/docs/10/static/auth-methods.html#AUTH-PASSWORD and
  90. https://www.postgresql.org/docs/current/static/sasl-authentication.html)
  91. * A lot of typespecs were rewritten and lots of internal typespecs were added
  92. Incompatibilities:
  93. * Some unexpected performance issues may appear, but we expect performance improvements, especially
  94. for a large result sets (when a lot of rows are returned by a query) and for large string/json/blob
  95. query parameters
  96. * Undocumented epgsql:update_type_cache/2 API was changed
  97. * A lot of typespecs were updated. Some typespecs were deprecated or moved from epgsql.erl to other
  98. modules. So, some new dialyzer warnings might pop-up
  99. * Some new error messages might be returned, especially from epgsql:connect/X functions
  100. * Memory consumption per-connection might slightly grow because we maintain per-connection OID<->codec
  101. mapping table, which might be quite big in some cases. This also may produce bigger error_logger
  102. reports in case of epgsql connection process crashes.
  103. * Some exported .hrl files have been changed. #column{} and #statement{} record definitions were extended.
  104. * PostGIS users might be affected by cleanup of ewkb.erl and epgsql_geometry.hrl
  105. * Streaming replication users should pay extra attention. No tests were broken, but a lot of
  106. modifications were made to this code.
  107. * Passing integer / atom / float as a value of a text / varchar / bytea query parameter is now
  108. deprecated (so, `epgsql:equery(C, "SELECT $1::text", [my_atom])` will still work but is not recommended)
  109. * Redshift and CockroachDB users might expirience some problems. Please, report bugs!
  110. In 3.4.0
  111. * Use rebar3 as default build and test tool
  112. * Move tests to common test; launch test postgresql server from Erlang
  113. * Compatibility with Erlang 20
  114. * `ssl_options` connection option fixed
  115. * New types: int8range and int4range
  116. In 3.3.0
  117. * Streaming replication protocol support (epgsql may act like PostgreSQL slave)
  118. https://github.com/epgsql/epgsql/blob/devel/streaming.md
  119. * Connection options now may be passed as map()
  120. * More error extra data fields returned in #error{extra}
  121. http://www.postgresql.org/docs/current/interactive/protocol-error-fields.html
  122. * Prefer non-localized severity in #error{severity} when available
  123. * Added `set_notice_receiver/2` function to dynamically change receiver for asynchronous notifications
  124. * Asynchronous notifications receiver may be set to registered process name (atom)
  125. * `get_cmd_status/1` function added
  126. * Fixed return value of `DELETE ... RETURNING ..` in case when 0 rows were deleted
  127. (now returns `{ok, 0, Columns, []}` instead of `{ok, 0}`)
  128. * TCP socket implicitly closed when epgsql connection process terminates
  129. * Some typespecs fixed
  130. In 3.2.0:
  131. * #error.codename (more readable errors)
  132. * Redshift support (by allowing dynamic typecache update fail)
  133. * Aggregate small binary packets to one in epgsql_sock (network performance improvement)
  134. * Handle situations, when server initiate connection close
  135. * prepared_query APIs (useful when you need to execute one query many times with different parameters)
  136. * array of records type support
  137. * jsonb type support
  138. In 3.1.1:
  139. * It dialyzes happily now
  140. In 3.1.0:
  141. * Deal with int4range type.
  142. In 3.0.0:
  143. * Renamed everything to use the epgsql namespace.