Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Welcome to PL/Rust v1.1.0. It is primarily a bugfix release in response to issues created and noticed immediately after v1.0.0.
New Features
Zero Copy Arrays by @eeeebbbbrrrr in #298
When a
LANGUAGE plrust
function has anARRAY
argument, it is now treated as apgrx::Array
, which is a zero-copy wrapper over the underlying Postgres ArrayType.The primary change here is that v1.0.0 used a
Vec<T>
, so it provided random access into the array at the expense of deconstructing the whole thing ahead of time.pgrx::Array
is essentially a lazy Iterator with some convenience methods like.len()
. If you need random access into the array, you'll need to collect into aVec<Option<T>>
first:Existing functions based on PL/Rust v1.0.0 will continue to compile unchanged during a pg_dump/pg_reload cycle, but users should consider updating their function code and re-creating them with CREATE OR REPLACE FUNCTION.
Bug Fixes
Purposely fail to create on databases that aren't
UTF8
by @eeeebbbbrrrr in #281PL/Rust can only support databases that are UTF8 encoded and going forward PL/Rust will fail during
CREATE EXTENSION
if this is isn't the case.It is possible in the future we can lift or greatly lessen this restriction
Incorrect type mappings by @eeeebbbbrrrr in #299
A few SQL types were incorrectly mapped to Rust types at either the argument or return type positions. The changes are:
BYTEA
is now returned as aVec<u8>
CSTRING
is now a&CStr
at the argument position and aCString
at the return type positionTID
is now apg_sys::ItemPointerData
in both argument and return positionsGeneral Project Cleanup
Add Dockerfile for quick trial use by @BradyBonnette in #287
See the documentation to quickly try PL/Rust within a Docker container!
While not at all a production-worth Dockerfile, our hope is that it'll be easy for newcomers to interactively try PL/Rust.
AnyNumeric
now supports thestd::iter::Sum
trait pgcentralfoundation/pgrx#1117Functions that use NUMERIC can now easily sum an array/iterator of them:
Other Minor Changes
pgrx
. by @eeeebbbbrrrr in Updates to usepgrx
. #294, upgrade dependencies, which includes pgrx 0.8.0 #297Documentation
New Contributors
Full Changelog: v1.0.0...v1.1.0