Releases: leafo/pgmoon
v1.16.0
https://luarocks.org/modules/leafo/pgmoon
Install
luarocks install pgmoon
OPM
opm install pgmoon
What's Changed
- use git+ssh protocol in rockspec source url by @mecampbellsoup in #126
- Add support for X509 signature algorithms such as RSA-SHA1 and ECDSA-with-SHA384 by @gsimko in #130
New Contributors
Full Changelog: v1.15.0...v1.16.0
v1.15 - Extended query protocol
https://luarocks.org/modules/leafo/pgmoon
https://opm.openresty.org/package/leafo/pgmoon/
Additions
- Add support for Postgres extended query protocol (using text transport) See https://github.com/leafo/pgmoon#extended-and-simple-query-protocols
- Add support for
pgmoon_serialize
metamethod on objects to allow objects to describe how they can be serialized See https://github.com/leafo/pgmoon#custom-type-serializer - Implement
pgmoon_serialize
for the includedPostgresArray
type - Add the
set_type_deserializer
method for easier configuration of deserialization (the undocumentedset_type_oid
method is deprecated) See https://github.com/leafo/pgmoon#custom-type-deserializer
Changes
- The
query
method can now take additional arguments to cause the query to be sent using the extended query protocol with parameters from the arguments - Array deserialization is now aware of the
NULL
value and will returnpostgres.NULL
instead of the string"NULL"
self.sock
is no longer set tonil
when callingdisconnect
orkeepalive
(you can reconnect again without allocating a new socket- Calling
disconnect
will now send a terminate message to the server before closing the socket, following the disconnection protocol - previously, on some errors, the socket would be disconnected. This is no longer the case, if message processing fails then the function returns the error result but the socket is left as is so you can continue to attempt operations on it
escape_literal()
can now takepgmoon.NULL
as a value and will returnNULL
convert_nulls
is now a config option specified in the constructor- Minor performance optimizations to batch together network operations where possible
Misc
- Substantial updates to documentation: detailing new features, usage tips and examples, and other organizational updates
- Add test suite runner for openresty using
resty
command
v1.14.0
https://luarocks.org/modules/leafo/pgmoon
https://opm.openresty.org/package/leafo/pgmoon/
What's Changed
- pgmoon.crypto wil use resty.openssl / resty.string libraries when available if luaossl is not available @bungle in #117
- Socket is created on
connect
if one doesn't already exist (due to previously disconnecting) #44 - Add ability to pass cqueues openssl context and automatic cqeues ssl context creation supports generic parameters for
ssl_version
,ssl_verify
, key and cert (see readme) #70 - Empty arrays will now generate valid syntax (
ARRAY[]
) so you can cast it to the right type or have postgres throw a more meaningful error message - Refactored how configuration object is handled internally to prevent storing values directly on instance. (Note the original config object is kept referenced via metatable)
New Contributors
Full Changelog: https://github.com/leafo/pgmoon/compare/v1.13.0...v1.14.0###
v1.13.0
https://luarocks.org/modules/leafo/pgmoon
https://opm.openresty.org/package/leafo/pgmoon/
What's Changed
- Add support for scram_sha_256_auth by @murillopaula
- feat(socket) change LuaSec ssl_protocol default options by @jeremymv2 in #103
- Make application_name pg client init param configurable by @mecampbellsoup in #110
- feature: added 'backlog' and 'pool_size' options while using ngx.socket. by @xiaocang in #105
New Contributors
- @jeremymv2 made their first contribution in #103
- @mecampbellsoup made their first contribution in #110
- @xiaocang made their first contribution in #105
Full Changelog: v1.12.0...v1.13.0
v1.12.0
This update is required for the latest version of OpenResty: A compatibility change with how a number is converted from a pattern has caused a issue with how queries with an affected row count return.
https://luarocks.org/modules/leafo/pgmoon
Dependencies update:
There is now a guide on the top of the documentation listing all the optional dependencies for different environments. Because support for all versions of Lua has been added, Luabitop is no longer automatically installed as a dependency. This means that if you wish to use pgmoon with Lua 5.1 or 5.2 then you will need to install it manually:
$ luarocks install luabitop
If you are upgrading then you will already have it installed
Changes:
- Lua pattern to number compatibility fix (John Regan @jprjr)
- Support for Lua 5.1 through 5.4 (John Regan @jprjr)
- Fix bug where SSL version was not being passed when using LuaSec (Murillo Paula @murillopaula)
- Default to TLS v1.2 when using LuaSec
- Luabitop is no longer automatically installed as a default dependency (for Lua version compatibility)
- Migrate test suite from Travis to GitHub actions. Test suite now uses docker to spawn test postgres servers