From 20ebc13f36ccc4a2d78a802766602fb7019e4d8b Mon Sep 17 00:00:00 2001 From: Ashutosh Bapat Date: Fri, 19 Jul 2024 21:32:30 +0530 Subject: [PATCH 5/6] Fix spurious column not found error Attribute name from a heap tuple needs to be copied before releasing the resources held by the tuple and the table scan. Ashutosh Bapat --- src/backend/commands/propgraphcmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/backend/commands/propgraphcmds.c b/src/backend/commands/propgraphcmds.c index f204fc3125..6b15749c5e 100644 --- a/src/backend/commands/propgraphcmds.c +++ b/src/backend/commands/propgraphcmds.c @@ -726,7 +726,7 @@ insert_property_records(Oid graphid, Oid ellabeloid, Oid pgerelid, const PropGra cr = makeNode(ColumnRef); rt = makeNode(ResTarget); - cr->fields = list_make1(makeString(NameStr(att->attname))); + cr->fields = list_make1(makeString(pstrdup(NameStr(att->attname)))); cr->location = -1; rt->name = pstrdup(NameStr(att->attname)); -- 2.34.1