From 4ff6e5c32d37bbcda467fe3c9f280e32d0e1bbed Mon Sep 17 00:00:00 2001 From: Robert Pang Date: Wed, 6 May 2026 11:13:13 -0700 Subject: [PATCH] Fix dangling assignment of relationpath for Postgres 18. The return value of GetRelationPath() is an rvalue for the duration of the assignment only. Signed-off-by: Robert Pang --- pgfincore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pgfincore.c b/pgfincore.c index 9f3707a..1c92887 100644 --- a/pgfincore.c +++ b/pgfincore.c @@ -151,7 +151,7 @@ Datum pgfincore_drawer(PG_FUNCTION_ARGS); relpathbackend((rel)->rd_locator, (rel)->rd_backend, (forkname_to_number(text_to_cstring(forkName)))) #else #define relpathpg(rel, forkName) \ - relpathbackend((rel)->rd_locator, (rel)->rd_backend, (forkname_to_number(text_to_cstring(forkName)))).str + pstrdup(relpathbackend((rel)->rd_locator, (rel)->rd_backend, (forkname_to_number(text_to_cstring(forkName)))).str) #endif /*