% erl-pgc changelog
- Add
pgc_model:column_fun/1
andpgc_model:column_fun/2
. - Introduce query tracing.
- Fix dialyzer type specification for
error_and_notice_fields/0
.
- The last argument of
pgc:with_transaction/3
is now of typepgc:transaction_options/0
.
- Add
pgc_model:decode_rows/2
andpgc_model:decode_rows/3
. - Add
pgc_model:decode_row/2
andpgc_model:decode_row/2
to keep names coherent. - Add
pgc_model:column_tuple/3
,pgc_model:column_csv/3
to add a correlation string to all column names. Addpgc_model:columns/3
andpgc_model:column/3
for the same use case. - Add default values to models.
- Add support for enum values.
- Add support for domain values.
- Add
pgc:stop_pool_clients/1
to stop all clients in a pool. It is particularly useful when an application creates new database types and wants to ensure all connection are re-created so that type sets get reloaded. - Add support for the
REGCONFIG
type.
- Fix rollback when a transaction function returns an error tuple.
- Fix handling of unknown
gen_server
calls. - Delete the model registry ETS table during shutdown.
- Do not pass null values to custom encoding and decoding functions in models.
- Make the client less verbose.
- Fix type specification for model values.
- Export missing types for models.
- Introduce the
pgc:error/0
andpgc:notice/0
types to avoid manipulating thepgc_proto:error_and_notice_fields()
type. - Add support for the
void
pseudo-type. - Add
pgc:simple_exec/2
. - Add functions to manipulate timestamp and time values.
- Add a
log_messages
client option to log messages received by the client. Default to false to avoid spamming as it was before. - Add
pgc_utils:quote_identifier/1
. - Add a
pgc_model
module providing a data model definition system making it easier to convert data business entities to database rows and vice versa. - Add a
log_backend_notices
client option (default:true
) to control the logging of notice messages sent by the server.
- Fix query failure logging in
pgc:with_transaction/2
. - Fix response handling for empty statements.
- Fix the default application name.
- Fix MD5 password authentication.
- Query functions now return type decoding errors instead of signalling them
with
error/1
. - Registered names are now listed in the application definition file.
- Annotate connection errors as
{connect, Reason}
. - Include the pool id in the log domain.
- Fix handling of query responses which do not contain any row.
- Use host strings (or binaries) for client connection addresses instead of inet values.
- The
pgc_pool:start_link/2
function now accepts a pool identifier and not a process name. - Remove
pgc_pool:start_link/1
.
The big change with this new version is the renaming from pg
to pgc
, to
avoid conflict with a new module named pg
introduced in Erlang 23.
Infortunately, there is a single global module namespace, and there is no way to avoid or resolve conflicts in any way.
- Fix the default value of pool specifications in the configuration of the application.
- Rename
pg_pool:pool_name/0
intopgc_pool:name/0
andpg_pool:pool_ref/0
intopgc_pool:ref/0
.
- It is now possible to start supervised pools using
pg:start_pool/2
. - Pool processes are now registered with a name based on the id provided in
the application configuration (or passed to
pg:start_pool/2
). For example, a pool identified asexample
will have a process namedpg_pool_example
. It is therefore easier to guarantee name unicity. - Add
pg:pool_stats/1
,pg:acquire/1
,pg:release/2
,pg:with_client/2
,pg:with_transaction/2
, which takes a pool identifier as argument instead of a pool reference. - Add
pg:exec/2
,pg:exec/3
,pg:exec/4
,pg:query/2
,pg:query/3
,pg:query/4
. They simply call the equivalent functions frompg_client
.
- Fix various invalid types.
- Log domains are now
[pg, client]
for clients and[pg, pool]
for pools. - Query options are now the empty map by default, making
pg:default_query_options/0
andpg:query_options/0
useless. These functions have been removed. - The set of pools in the application configuration file is now a map instead of a list of tuples.
First public version.