-
Notifications
You must be signed in to change notification settings - Fork 162
/
CHANGES
217 lines (178 loc) · 10.2 KB
/
CHANGES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
In 4.7.1
* Handle `ReadyForQuery` after `Error` in replication mode #279
* Fix the issue with columns in multi-squery response #283
* Fix compatibility with OTP-26 #284
In 4.7.0
* Flow control `{socket_active, N}` option in streaming replication #271
* `{socket_active, N}` option generalized to all `epgsql` modes #278
* CI upgraded to support OTP-25, OTP-19 dropped, run some tests on PostgreSQL 14 #276
* `format_status/1` OTP-25 `gen_server` callback implemented #277
In 4.6.1
* Introduce `get_backend_pid` function #270
* Fix dialyzer error in `get_parameter` #274
In 4.6.0
* Full OTP-24 compatibility #255, #262, #263
* Implement `COPY .. FROM STDIN` sub-protocol (both binary and text formats) #248
* Stick to rebar3_lint 0.2.0 (newer version had troubles working from
non-default profile) #249
* Pipelined and mixed api tests (better coverage of the features of
`epgsqla` and `epgsqli` interfaces) #244
* Add `ebin/` to the list of ignored directories in .gitignore #251
* Fix `-if(?OTP_RELEASE ...)` (was missing question mark) #255
* Do not format certain attributes of `State` on abnormal epgsql
sock termination (common reason for OOM) #257
* Make dialyzer warn about use of unknown types; fix some occurrences of such #259
* Migrate from travis-ci to github actions; test on PostgreSQL 12 #262, #264
* Introduce transaction_opts type #261
In 4.5.0
* Add support for `application_name` connection parameter #226
* Execute request cancellation over TLS, when main connection is TLS as well #227
* Handle skipped commands in execute_batch #228
* Add sasl_prep implementation for validating passwords according to sasl specification #229
* OTP-23 in CI #237
* switch to `crypto:mac/4` since `crypto:hmac/3` is deprecated #239
* Add `tcp_opts` connect option #242
* Command API improvements #243
In 4.4.0
* Guards are now added to avoid silent integer truncation for numeric and
numeric range datatype codecs. So, an attempt to encode 100000 as `int2`
will now crash the connection instead of silently truncating it. #218
* `epgsql{a,i}:cancel/1` API was documented. #224
* Version of `execute_batch` that uses the same SQL query for each request
in a batch. Very convenient for batch-inserts. #209
* It's now possible to provide `#statement{}` to `prepared_query/3`. This way
of calling it eliminates extra `describe` round-trip thus making it more
efficient. #207
* Representation of SQL `NULL` is now fully configurable. You can choose what
set of Erlang terms should be interpreted as `NULL` and which term to use to
represent `NULL`s received from database. #212
* It's now possible to choose between 3 representations of a `hstore` datatype:
map(), jiffy-style objects (default) and proplist. It can also take `map()` as
input now. NULL value representation is also configurable. #217
* Edocs build was fixed. Just run `rebar3 edoc` and reference documentation for
all modules will be generated. But it's considered to be more "internal"
documentation for those who want to learn more about epgsql internals or
to do some hacking. It complements, but not replaces README. #214
* `epgsql:connect` `timeout` option is more strict now - it limits TCP and SSL
setup time as a whole. #223
* Test coverage report was enabled in CI. We will fail the build if coverage
falls below 55%. We hope to improve this metric over time. #208
* We now send `Terminate` message to the server when doing graceful connection
shutdown (as recommended by protocol). #219
* We found that `describe(_, portal, _)` API was broken since release v4.0.0, but
was not covered by tests. So now it was fixed and tests were added. #211
* Error code to error name conversion code was updated (see `#error.codename`).
Some new codes were added (mostly related to JSON datatypes) and one has changed.
So, if you were matching over `#error.codename` being
`invalid_preceding_following_size` you have to update your code. #210
* `#column{}` record is now fully documented. It was extended to
include `table_oid` and `table_attr_number` fields which point to the originating
database table of this column (if any). #205
* Extended timerange datatype support #204
* Some minor typos, datatype and CI fixes #199 #201 #206 #221
In 4.3.0
* Erlang 22 compatibility is tested; support for Erlang 17 was dropped. Last
version that supports Erlang 17 is 4.2.1 (#195)
* Fixed some corner-case bug in streaming replication (#181)
* It's now possible to set-up JSON encoder/decoder callback for json/jsonb
datatypes (#197)
* Performance micro-optimizations on hot paths (#177)
* Use PostgreSQL 10 for Travis tests (#195)
* Improved connection error handling (#183)
* TLS certificates used in tests had expired (epgsql project is more than
10 years old!), so, new ones were created (#187)
* Some typespecs fixed
In 4.2.1
* Bug fix for `epgsql:connect(proplist())`
In 4.2.0
* Support for R16 was completely dropped. Maps are now used internally instead of proplists
* Nested `record` datatype decoding bug, introduced in 4.0.0, was fixed
* Added tsrange, tstzrange, daterange types
* Passwords are obfuscated before they sent to connection process. This is to avoid plain
DB passwords to be dumped to SASL crash log
* Password can be provided as a fun: `fun ( () -> iodata() )`
* `platform_define` macros were simplified. It's now possible to build epgsql even without
rebar on all supported OTP versions
In 4.1.0
* Fix Erlang 21 `get_stacktrace/0` warnings
* Fix broken backward-compatibility in `bpchar` datatype
* Fix compatibility issues between the newest rebar3 and Erlang R16
In 4.0.1
* Minor build bug fixed
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 experience some problems. Please, report bugs!
In 3.4.0
* Use rebar3 as default build and test tool
* Move tests to common test; launch test postgresql server from Erlang
* Compatibility with Erlang 20
* `ssl_options` connection option fixed
* New types: int8range and int4range
In 3.3.0
* Streaming replication protocol support (epgsql may act like PostgreSQL slave)
https://github.com/epgsql/epgsql/blob/devel/streaming.md
* Connection options now may be passed as map()
* More error extra data fields returned in #error{extra}
http://www.postgresql.org/docs/current/interactive/protocol-error-fields.html
* Prefer non-localized severity in #error{severity} when available
* Added `set_notice_receiver/2` function to dynamically change receiver for asynchronous notifications
* Asynchronous notifications receiver may be set to registered process name (atom)
* `get_cmd_status/1` function added
* Fixed return value of `DELETE ... RETURNING ..` in case when 0 rows were deleted
(now returns `{ok, 0, Columns, []}` instead of `{ok, 0}`)
* TCP socket implicitly closed when epgsql connection process terminates
* Some typespecs fixed
In 3.2.0:
* #error.codename (more readable errors)
* Redshift support (by allowing dynamic typecache update fail)
* Aggregate small binary packets to one in epgsql_sock (network performance improvement)
* Handle situations, when server initiate connection close
* prepared_query APIs (useful when you need to execute one query many times with different parameters)
* array of records type support
* jsonb type support
In 3.1.1:
* It dialyzes happily now
In 3.1.0:
* Deal with int4range type.
In 3.0.0:
* Renamed everything to use the epgsql namespace.