Re: Ineffective Assert-check in CopyMultiInsertInfoNextFreeSlot()

2024-08-16 Thread David Rowley
On Fri, 16 Aug 2024 at 23:48, Amul Sul wrote: > The Assert(buffer != NULL) is placed after the buffer is accessed, > which could lead to a segmentation fault before the check is executed. Yeah, that's not great. Technically the Assert does not add any value in terms of catching bugs in the code,

Ineffective Assert-check in CopyMultiInsertInfoNextFreeSlot()

2024-08-16 Thread Amul Sul
Hi, The Assert(buffer != NULL) is placed after the buffer is accessed, which could lead to a segmentation fault before the check is executed. Attached a small patch to correct that. -- Regards, Amul Sul EDB: http://www.enterprisedb.com diff --git a/src/backend/commands/copyfrom.c b/src/backend/c