Releases: pgcentralfoundation/pgrx
v0.13.0
Welcome to pgrx v0.13.0. The first update in a little bit, which makes pgrx current with upstream dependencies, rust 1.85.0 (but not 2024 Edition, yet), and a slew of fixes and cleanups and community contributions.
Upgrading
You'll need to cargo install cargo-pgrx --version 0.13.0 --locked
to get the latest cargo-pgrx
tool, and then you can run cargo pgrx upgrade
in your extension crates to update their dependencies.
Breaking Changes
Generally, the only breaking changes in v0.13.0 are related to the user-facing SPI APIs. In general, SPI functions that previously took a Vec of Arguments now take a &[DatumWithOid]
, with proper lifetime bounds. This is a fairly straightforward boilerplate to update.
@YohDeadfall has done a lot of work on improving SPI's safety and it's greatly appreciated!
What's Changed
cargo-pgrx
- fix a deadlock in
cargo pgrx install
duringget_git_hash()
by @eeeebbbbrrrr in #1935 cargo pgrx test --runas
envar passing by @eeeebbbbrrrr in #1674- Search for sql upgrade scripts relative to the package manifest by @tristan957 in #1979
Build System
- use
allowlist_file
for bindgen by @usamoi in #1922 - add
pg_config --libdir
to linker search path by @usamoi in #1932 - lock patch version of pgrx-bindgen by @usamoi in #1939
- Introduce a blocklist of "yanked" Postgres versions by @eeeebbbbrrrr in #1950
- Make sure bindgen gets the cppflags even if we aren't using macOS by @thomcc in #1336
SPI
- Made SPI query arguments type safe by @YohDeadfall in #1858
- Changed args of prepare methods to be slices by @YohDeadfall in #1933
- Added connect_mut for data changing SPI operations by @YohDeadfall in #1913
General pgrx-pg-sys
Interfaces
- Allow creating Oid from a u32 in a const context by @syvb in #1943
- Add utils/acl.h by @daamien in #1945
- Add catalog/catalog.h by @daamien in #1946
- Added
oids_of!
macro by @YohDeadfall in #1879 - Port
bufpage.h
functions by @rebasedming in #1982
Bug Fixes
Overall Code Cleanup
- refactor: remove redundant references (
&
) by @hamirmahal in #1941 - fix warnings by @usamoi in #1948
- Updating readme.md by @ChronicallyJD in #1949
- style: simplify some statements for readability by @hamirmahal in #1962
- docs: fix pgx info in cargo-pgrx README by @mrdrivingduck in #1953
- Updated expected UI test outputs by @YohDeadfall in #1981
- Fix "about" info for cross subcommand by @mjgarton in #1974
- update dependencies and fix compilation issues by @eeeebbbbrrrr in #1983
Thanks!
Thanks to the community, past, present, and future. Especially to our new contributors...
New Contributors
- @var77 made their first contribution in #1938
- @ChronicallyJD made their first contribution in #1949
- @mrdrivingduck made their first contribution in #1953
- @tristan957 made their first contribution in #1979
- @mjgarton made their first contribution in #1974
Full Changelog: v0.12.7...v0.13.0
v0.12.9
This is pgrx v0.12.9. This version will refuse to build against Postgres versions 17.1, 16.5, 15.9, 14.14, 13.17, and 12.21. These Postgres versions introduced an ABI incompatibility that we'd rather just not ever have to deal with.
As always, to upgrade please run cargo install cargo-pgrx --version v0.12.9 --locked
.
You may need to run another cargo pgrx init
to pickup the new latest versions of each major release.
What's Changed
- Blocklist "bad" postgres versions by @eeeebbbbrrrr in #1950
- Update version to 0.12.9 by @eeeebbbbrrrr in #1951
Full Changelog: v0.12.8...v0.12.9
v0.12.8
This is pgrx v0.12.8. It fixes a potential deadlock during the cargo-pgrx
"install" process if any of the extension schema files include the @GIT_HASH@
variable. How bizarre!
As always, to upgrade please run cargo install cargo-pgrx --version v0.12.8 --locked
.
What's Changed
- PR #1935
Full Changelog
v0.12.7
Welcome to pgrx v0.12.7. This is a minor release which adds a few more Postgres headers, fixes a possible crashing bug, adds some more smarts to #[pg_cast
], and adds a new GucFlags
variant.
To upgrade, please execute cargo install cargo-pgrx --version 0.12.7 --locked
. Then you can run cargo pgrx upgrade
against your extension crates.
The plan is that this will be the last release in the v0.12.x series.
What's Changed
More Headers
- add
storage/freespace.h
by @rebasedming in #1923 - add
commands/progress.h
by @usamoi in #1924
New Features
- Imply
NOT_IN_SAMPLE
forGucFlags::NO_SHOW_ALL
by @Ngalstyan4 in #1925 - Teach
#[pg_cast]
how to pass down arguments useful to#[pg_extern]
by @eeeebbbbrrrr in #1930
Less Build Drama
- Explicitly enable object Cargo features by @workingjubilee in #1926
Safety
- fix: crash from drop impls that panic via
leak_and_drop_on_delete()
by @eeeebbbbrrrr in #1929
New Contributors
- @Ngalstyan4 made their first contribution in #1925
Full Changelog:
v0.12.6...v0.12.7
v0.12.6
Welcome to pgrx v0.12.6. This release fixes a number of bugs, cleans up various parts of the code, adds more Postgres #include
headers, and other little things.
To upgrade, first install cargo-pgrx with cargo install cargo-pgrx --version 0.12.6 --locked
. Then you can run cargo pgrx upgrade
in your extension's crate to update its dependencies.
What's Changed
- Removed extra allocation from
IntoDatum for char
by @YohDeadfall in #1887 - Fixed IntoDatum impl for char introduced by #1887 by @YohDeadfall in #1889
- Support refs to unsized SqlTranslatable types by @workingjubilee in #1890
- Nullable is Copy when T is Copy by @workingjubilee in #1884
- Macro based IntoDatum for string types by @YohDeadfall in #1886
impl FromDatum for CString
by @workingjubilee in #1896- Add
BorrowDatum
for unsizing borrows of datums by @workingjubilee in #1891 - Always panic if len of varlena exceeds the maximum by @YohDeadfall in #1894
- Use cstr literal syntax to avoid unsafe and ??? by @workingjubilee in #1898
- Implement UnboxDatum for ItemPointerData by @syvb in #1900
- fix compilation on some CPUs and Windows by @usamoi in #1901
- docs: update generic type name of TableIterator by @SteveLauC in #1905
- Remove Python workaround for Homebrew by @workingjubilee in #1908
- Improved messages for json errors by @YohDeadfall in #1893
- Adds more headers by @aykut-bozkurt in #1910
- docs: align description of GucContext::SuBackend and GucContext::Backend with original PostgreSQL description by @mrl5 in #1909
- docs: update outdated README by @SteveLauC in #1914
- fix compilation on emscripten by @usamoi in #1917
- feat: include 'storage/indexfsm.h' by @SteveLauC in #1912
- refactor: more CStr literals by @SteveLauC in #1911
- fix segfault with empty
numrange
duringfrom_datum()
by @eeeebbbbrrrr in #1918
New Contributors
Full Changelog: v0.12.5...v0.12.6
v0.12.5
Welcome to pgrx v0.12.5. This is a big minor release because it brings support for Postgres v17.0, released on Sept 26th, 2024. Much thanks to the Postgres folks for all their hard work! We'd have to do this for MySQL otherwise!
To upgrade to pgrx v0.12.5, do cargo install cargo-pgrx --version 0.12.5 --locked
. Once installed you can run cargo pgrx upgrade
in the root of all your extension crates to update their dependencies.
New Features
- Move from pg17rc1 to pg17ga by @eeeebbbbrrrr in #1881
pgrx now supports Postgres v17.0! You'll want to run another cargo pgrx init
to get the latest release of all Postgres versions, including 17.
- Stable
cargo pgrx schema
output by @eeeebbbbrrrr in #1867
diff
s between schema versions should be a lot prettier now as cargo pgrx schema
should be repeatable from run-to-run and otherwise output in a predictable order.
Regular and cross-compiles should be more reliable now thanks to using cc
to compile the tiny bit of C code pgrx includes.
- Allowed
CStr
to be used as SPI commands by @YohDeadfall in #1864
Made with love to those who don't like allocations!
Bug Fixes
- Fixed conversion of i64 and f64 to datums on 32-bit machines by @YohDeadfall in #1859
More Postgres Headers
#include "commands/extension.h"
by @eeeebbbbrrrr in #1880#include "commands/prepare.h"
by @kysshsy in #1873#include "parser/parse_collate.h"
by @eeeebbbbrrrr in #1880#include "parser/parse_relation.h"
by @eeeebbbbrrrr in #1872
Docs & Examples
- Updated macOS instructions by @ccleve in #1869
- Add an example of a WAL decoder by @daamien in #1845
- Fixed a typo in the FFI docs by @YohDeadfall in #1863
Code Cleanup
- Address elided lifetimes lints by @workingjubilee in #1861
- Removed not used sigsetjmp by @YohDeadfall in #1862
New Contributors
Full Changelog: v0.12.4...v0.12.5
v0.12.4
Welcome to pgrx v0.12.4.
First, and most importantly, it fixes a segfault when converting a NULL pg_sys::Datum
into a Rust String
. It seems you'd need to go out of your way to cause the segfault, but nonetheless, it shouldn't happen. A NULL Datum should convert to Option::None
in all situations.
Secondly, @aykut-bozkurt has properly defined microseconds, which is critical for proper Time conversions.
From there, @usamoi enhanced our bindings generation such that we now auto-generate wrappers for any of Postgres' static inline
functions in the included headers. This is great as it eliminates our need to manually write these wrappers and it automatically exposes a lot more.
And thanks to @YohDeadfall AnyArray
is now iterable!
As always, please upgrade using cargo install cargo-pgrx --version 0.12.4 --locked
. Then you can use cargo pgrx upgrade
to update the dependencies in your extension crates.
What's Changed
- use bindgen to generate wrappers of static inline functions by @usamoi in #1844
- Unified argument names of Query methods by @YohDeadfall in #1848
- Fixes wrong value for microsecs in a day by @aykut-bozkurt in #1849
- fix segfault converting a null
pg_sys::Datum
to aString
by @eeeebbbbrrrr in #1853 - Added into_iter for anyarray by @YohDeadfall in #1851
Full Changelog: v0.12.3...v0.12.4
v0.12.3
Welcome to pgrx v0.12.3. This point release upgrades to use the new Postgres 17rc1.
As usual, please cargo install cargo-pgrx --version 0.12.3 --locked
. Then you can run cargo pgrx upgrade
in your extension crate's root to update its dependencies.
What's Changed
- Fixups of issues left from #1837 by @YohDeadfall in #1843
- move to Postgres v17rc1 by @eeeebbbbrrrr in #1846
Full Changelog: v0.12.2...v0.12.3
v0.12.2
Welcome to pgrx v0.12.2. This is a minor release that fixes a few bugs, improves compilation times with cargo pgrx run/install/test
, and adds a few more Postgres headers.
As usual, please cargo install cargo-pgrx --version 0.12.2 --locked
. Then you can run cargo pgrx upgrade
in your extension crate's root to update its dependencies.
What's Changed
- [
CPPFLAGS
] Switch toUSE_ASSERT_CHECKING
by @SamuelMarks in #1826 - Add UnboxDatum for Range by @mhov in #1827
- Moved Sized from FromDatum methods to trait by @YohDeadfall in #1831
- Used SPI result type for cursor API by @YohDeadfall in #1836
- always compile
pgrx_embed_*
without opts by @eeeebbbbrrrr in #1838 - Fixed out of bounds reads for open_cursor by @YohDeadfall in #1837
- Include
access/visibilitymap.h
andutils/tuplestore.h
by @eeeebbbbrrrr in #1841
New Contributors
Thanks to these folks for their first-time contributions -- it's greatly appreciated!
- @SamuelMarks made their first contribution in #1826
- @YohDeadfall made their first contribution in #1831
Full Changelog: v0.12.1...v0.12.2
v0.12.1
You may be more interested in the release notes for 0.12.0.
What's Changed
- perf: avoid mem alloc in formatting, minor bug fix by @nyurik in #1521
- Deprecate
pgrx::hooks
without replacement by @workingjubilee in #1752 - Implement ArgAbi for PgRelation by @thomcc in #1823
- Address recent lint warnings by @workingjubilee in #1824
- Prepare pgrx 0.12.1 by @workingjubilee in #1825
Full Changelog: v0.12.0...v0.12.1