Releases: pgcentralfoundation/pgrx
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
v0.12.0
Cutting the 0.12.0 release as-is!
You may need to:
- rearrange some imports
- sed some types to use
pg_sys::EnumName::Type
(only the typedef, not the constants) - bump heapless to 0.8
impl ArgAbi
andimpl BoxRet
for custom types
Code which updates to this version of pgrx is actually sound for the Postgres function ABI, so sorry about the breakages!
What's Changed
- Error eagerly when given a pg_config for the wrong PG version by @thomcc in #1335
- Verify that the pgrx active thread is actually the main thread by @thomcc in #1319
- Fix flake by @bbigras in #1345
- Avoid colons in filenames by @passcod in #1346
- (cargo-pgrx init) Use toml serializer to write config.toml by @passcod in #1348
- Fixes nightly "cargo unlocked" tests by @BradyBonnette in #1350
- install --sudo destination path must exist to be canonicalized by @levkk in #1352
- Untar directly in rust by @passcod in #1347
- use
get_array_type
in Array IntoDatum by @workingjubilee in #1353 - Use and pass jobserver instead of limiting cores directly by @passcod in #1338
- Weaken bounds on Array impls by @workingjubilee in #1355
- Remove
IntoDatum::array_type_oid()
by @workingjubilee in #1356 - yeet IntoDatum for u32 by @workingjubilee in #1354
- Satisfy clippy errors on 7 of 8 crates by @workingjubilee in #1358
- (nfc) Unleash clippy --fix on pgrx::datum by @workingjubilee in #1359
- Remove Postgres 11 support by @workingjubilee in #1365
clippy --fix
pgrx libraries by @workingjubilee in #1366- Add
clippy -Awarnings
to CI and fix unsound fn by @workingjubilee in #1357 - Isolate non-dlopen Unix code in cargo-pgrx by @workingjubilee in #1367
- Pedantically use
pg_sys::Datum
(nfc) by @workingjubilee in #1372 - Use one 🦭 per crate by @workingjubilee in #1371
- Fix rustdoc lints by @workingjubilee in #1373
- Remove Amazon Linux 2 tests by @workingjubilee in #1377
- Fix timezone test after daylight savings shift by @thomcc in #1378
- Clean up more bounds in pgrx::datum::array by @workingjubilee in #1380
- Update fcinfo fn toward actual usage by @workingjubilee in #1375
- Autoclippify cargo-pgrx and other build-support crates by @workingjubilee in #1382
- Make
#[derive(PostgresType)]
impl its own FromDatum by @workingjubilee in #1381 - Allow safe u32 -> Oid conversions by @workingjubilee in #1374
- Remove Postgres 11 detritus by @workingjubilee in #1385
- Partially clean up pgrx-sql-entity-graph by @workingjubilee in #1386
- Sniff for libclang-version-correct headers by @workingjubilee in #1325
- Don't run the blender on weekends by @workingjubilee in #1396
- Remove unused cshim headers by @workingjubilee in #1395
- Cleanup pgrx sql entity graph more by @workingjubilee in #1387
- Fix actions badge by @muzimuzhi in #1401
- Add Illumos target for sigsetjmp function. by @LuminousMonkey in #1403
- Add trusted option in the control file by @liuxueyang in #1397
- Begin work on a guide by @workingjubilee in #1402
- Add storage related api by @silver-ymz in #1409
- Remove PgGuardRewriter by @workingjubilee in #1410
- Record ignorable commits by @workingjubilee in #1411
- Clippy a bunch of code again by @workingjubilee in #1412
- Factor out rewriter fn by @workingjubilee in #1413
- Simplify logic in lifetimes.rs by @workingjubilee in #1416
- Allow most low-info clippy warnings by @workingjubilee in #1419
- Make sql-entity-graph clippy-clean by @workingjubilee in #1420
- :fix: avoid segfault on background worker pool exhaustion by @AndreaOddo89 in #1418
- Simplify void return handling by @workingjubilee in #1422
- Remove unused source-mapping code by @workingjubilee in #1424
- Deprecate
Oid::from_u32_unchecked
in 0.11.2 by @workingjubilee in #1426 - Tighten up
Pg_magic_func
code by @workingjubilee in #1423 - Stub out pgrx-internal.md by @workingjubilee in #1427
- Add
MemCx<'mcx>
forList<'mcx, T>
by @workingjubilee in #1342 - feat: add
ForeignDataWrapperRelationId
OID definitions by @burmecia in #1432 - does updating apt fix CI? by @eeeebbbbrrrr in #1438
- Include rule utils header by @daamien in #1431
- expand readme by @Lokathor in #1433
- Address the case when
RUSTFLAGS
environment variable is set but is empty by @eeeebbbbrrrr in #1435 - merge
develop-v0.11.2
by @eeeebbbbrrrr in #1439 - fix issue #1437 by @eeeebbbbrrrr in #1440
- add bindings for libpq by @usamoi in #1436
- Handle RUSTFLAGS better by @eeeebbbbrrrr in #1441
- Allow to build cargo-pgrx either with rustls (default) or native-tls by @jirutka in #1448
- Use native-certs with ureq by @workingjubilee in #1449
- Alpine should not need tar by @workingjubilee in #1450
- Add regproc.h by @workingjubilee in #1453
- use the full
cargo
version string in the version match check. by @Lokathor in #1443 - Adjust StringInfo wrapper impl to match actual definition by @workingjubilee in #1457
- Remove unused attrs on
Pg_magic_func
by @workingjubilee in #1460 - Manually staticize lifetimes in pgrx tests by @workingjubilee in #1461
- Demand lifetimes for
pgrx::composite_type!
by @workingjubilee in #1462 - Use
composite_type!
lifetimes in pgrx-sql-entity-graph by @workingjubilee in #1463 - fix undefined behaviour when loading control file by @usamoi in #1466
- Remove
impl Display for pg_sys::Oid
by @workingjubilee in #1469 - Allow
detail
argument and trailing commas inereport!
by @hoodiecollin in #1472 - Unbox types properly from arrays by @workingjubilee in #1476
- Filter
all
to both config && Cargo .tomls by @workingjubilee in #1487 - Add bindings for
include/multixact.h
by @rebasedming in #1486 - Include varlena functions by @daamien in #1485
- Use bindgen 0.69 by @workingjubilee in #1492
- Document CPU and OS support expectations by @workingjubilee in #1480
- Fixup docs for cargo-pgrx by @workingjubilee in #1491
- Bump shlex 1.3 to reduce escaping concerns by @workingjubilee in #1493
- Remove atty by @working...
v0.12.0-beta.5
pgrx 0.12.0-beta.5 will likely be the final1 beta release and we will be releasing 0.12.0 based on this code with almost no variation if no unpleasant surprises are discovered.
Misc Changes
- Some doc fixes from @SteveLauC, thank you!
- A number of FFI headers:
Postgres 17 beta3 support
Thanks to @eeeebbbbrrrr in #1790 we now have support for Postgres 17's beta3 release. This will be updated to whatever's actually current before we release 0.12.0 proper.
New bindgen settings
For this release, I extensively reworked our CI to make new releases easier and faster, by validating that the build problems that occurred for the pgrx 0.12.0-beta.0 release never happen again. This involved splitting out our bindgen-running code into its own crate, which you will see in your dependency tree, though you should never have a reason to explicitly depend on it. Now we test that the pgrx workspace always can be packaged in CI, and we verify that code on publishing.
As part of this I also did some additional tuning on our bindgen settings in #1804 so that it now generates &CStr
for appropriate constants (same content as the &[u8]
you may have used before).
New Contributors
- @SteveLauC made their first contribution in #1780
- @aykut-bozkurt made their first contribution in #1786
- @jeltz made their first contribution in #1790
Full Changelog: v0.12.0-beta.3...v0.12.0-beta.5
-
The astute may notice something about these release notes when compared with the previous: https://github.com/pgcentralfoundation/pgrx/releases/tag/v0.12.0-beta.4 ↩