Package: release.debian.org Severity: normal Tags: trixie X-Debbugs-Cc: [email protected] Control: affects -1 + src:plr User: [email protected] Usertags: pu
Please accept plr into trixie. [ Reason ] The new version is compatible with postgresql 17.12. [ Impact ] At least the regression tests are failing. I am not sure how much "normal" use of the extension is affected, but there are certainly cases that break. [ Tests ] Extensive upstream testsuite, manual testing. [ Risks ] Fix is already accepted upstream and the diff applied cleanly. [ Checklist ] [x] *all* changes are documented in the d/changelog [x] I reviewed all changes and I approve them [x] attach debdiff against the package in (old)stable [x] the issue is verified as fixed in unstable Christoph commit b86ef0b511d677f1986cf9d28a60b297740ef0a5 Author: Christoph Berg <[email protected]> Date: Sat Nov 14 11:09:16 2026 +0000 Cherrypick heap_copy_tuple_as_datum fix from upstream to fix building with Postgresql 17.12. diff --git a/debian/changelog b/debian/changelog index 96a84e5..4e247bf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +plr (1:8.4.7-3+deb13u1) trixie; urgency=medium + + * Cherrypick heap_copy_tuple_as_datum fix from upstream to fix building with + Postgresql 17.12. + + -- Christoph Berg <[email protected]> Sat, 14 Nov 2026 10:59:31 +0000 + plr (1:8.4.7-3) unstable; urgency=medium * Support PostgreSQL 18. diff --git a/debian/patches/copydatum b/debian/patches/copydatum new file mode 100644 index 0000000..e3c8d5c --- /dev/null +++ b/debian/patches/copydatum @@ -0,0 +1,62 @@ +commit 9c82ca9313c0c8a9c56c4a399aef6e00cc01067b +Author: Andre Mikulec <[email protected]> +Date: Tue Oct 6 23:08:46 2026 -0400 + + PostgreSQL 18 Release Build 9 + + * prepare for PL/R release of 8.4.8.9 + * Not expected to affect end-user programming + * For PL/R optimization, integrate heap_copy_tuple_as_datum() + * * (rec by Andres Freund from code of Tom Lane) + +--- a/plr.h ++++ b/plr.h +@@ -357,44 +357,20 @@ extern void R_RunExitFinalizers(void); + #define SET_INSERT_ARGS_567 \ + do { \ + SET_ARG(DirectFunctionCall1(textin, CStringGetDatum("INSERT")),false,5); \ +- tup = trigdata->tg_trigtuple; \ +- dtrigtup = (HeapTupleHeader) palloc(tup->t_len); \ +- memcpy((char *) dtrigtup, (char *) tup->t_data, tup->t_len); \ +- HeapTupleHeaderSetDatumLength(dtrigtup, tup->t_len); \ +- HeapTupleHeaderSetTypeId(dtrigtup, tupdesc->tdtypeid); \ +- HeapTupleHeaderSetTypMod(dtrigtup, tupdesc->tdtypmod); \ +- SET_ARG(PointerGetDatum(dtrigtup),false,6); \ ++ SET_ARG(heap_copy_tuple_as_datum(trigdata->tg_trigtuple, tupdesc),false,6); \ + SET_ARG((Datum)0,true,7); \ + } while (0) + #define SET_DELETE_ARGS_567 \ + do { \ + SET_ARG(DirectFunctionCall1(textin, CStringGetDatum("DELETE")),false,5); \ + SET_ARG((Datum) 0,true,6); \ +- tup = trigdata->tg_trigtuple; \ +- dtrigtup = (HeapTupleHeader) palloc(tup->t_len); \ +- memcpy((char *) dtrigtup, (char *) tup->t_data, tup->t_len); \ +- HeapTupleHeaderSetDatumLength(dtrigtup, tup->t_len); \ +- HeapTupleHeaderSetTypeId(dtrigtup, tupdesc->tdtypeid); \ +- HeapTupleHeaderSetTypMod(dtrigtup, tupdesc->tdtypmod); \ +- SET_ARG(PointerGetDatum(dtrigtup),false,7); \ ++ SET_ARG(heap_copy_tuple_as_datum(trigdata->tg_trigtuple, tupdesc),false,7); \ + } while (0) + #define SET_UPDATE_ARGS_567 \ + do { \ + SET_ARG(DirectFunctionCall1(textin, CStringGetDatum("UPDATE")),false,5); \ +- tup = trigdata->tg_newtuple; \ +- dnewtup = (HeapTupleHeader) palloc(tup->t_len); \ +- memcpy((char *) dnewtup, (char *) tup->t_data, tup->t_len); \ +- HeapTupleHeaderSetDatumLength(dnewtup, tup->t_len); \ +- HeapTupleHeaderSetTypeId(dnewtup, tupdesc->tdtypeid); \ +- HeapTupleHeaderSetTypMod(dnewtup, tupdesc->tdtypmod); \ +- SET_ARG(PointerGetDatum(dnewtup),false,6); \ +- tup = trigdata->tg_trigtuple; \ +- dtrigtup = (HeapTupleHeader) palloc(tup->t_len); \ +- memcpy((char *) dtrigtup, (char *) tup->t_data, tup->t_len); \ +- HeapTupleHeaderSetDatumLength(dtrigtup, tup->t_len); \ +- HeapTupleHeaderSetTypeId(dtrigtup, tupdesc->tdtypeid); \ +- HeapTupleHeaderSetTypMod(dtrigtup, tupdesc->tdtypmod); \ +- SET_ARG(PointerGetDatum(dtrigtup),false,7); \ ++ SET_ARG(heap_copy_tuple_as_datum(trigdata->tg_newtuple, tupdesc),false,6); \ ++ SET_ARG(heap_copy_tuple_as_datum(trigdata->tg_trigtuple, tupdesc),false,7); \ + } while (0) + #define CONVERT_TUPLE_TO_DATAFRAME(tt) \ + do { \ diff --git a/debian/patches/series b/debian/patches/series index af17f6c..064ac29 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ gamma +copydatum

