Skip to content

Commit 6dd2c46

Browse files
fvanneeRobAtticus
authored andcommitted
Add check for null in ca_append_rescan to prevent segfault
1 parent 71962b8 commit 6dd2c46

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/constraint_aware_append.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,10 @@ ca_append_rescan(CustomScanState *node)
273273
#if PG96
274274
node->ss.ps.ps_TupFromTlist = false;
275275
#endif
276-
ExecReScan(linitial(node->custom_ps));
276+
if (node->custom_ps != NIL)
277+
{
278+
ExecReScan(linitial(node->custom_ps));
279+
}
277280
}
278281

279282
static void

0 commit comments

Comments
 (0)