Relocate a badly placed Assert in COPY FROM code
David Rowley <drowley@postgresql.org>
Relocate a badly placed Assert in COPY FROM code There's not much point in asserting a pointer isn't NULL after some code has already dereferenced that pointer. Adjust the code so that the Assert occurs before the pointer dereference. The Assert probably has questionable value in the first place, but it seems worth keeping around to document the contract between CopyMultiInsertInfoNextFreeSlot() and its callers. Author: Amul Sul <sulamul@gmail.com> Discussion: https://postgr.es/m/CAAJ_b94hXQzXaJxTLShkxQUgezf_SUxhzX9TH2f-g6gP7bne7g@mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/copyfrom.c | modified | +4 −2 |
Discussion
- Ineffective Assert-check in CopyMultiInsertInfoNextFreeSlot() 2 messages · 2024-08-16