Re: Improve list manipulation in several places
Ranier Vilela <ranier.vf@gmail.com>
From: Ranier Vilela <ranier.vf@gmail.com>
To: David Rowley <dgrowleyml@gmail.com>
Cc: Richard Guo <guofenglinux@gmail.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2023-04-21T16:11:56Z
Lists: pgsql-hackers
Em sex, 21 de abr de 2023 9:10 AM, David Rowley <dgrowleyml@gmail.com> escreveu: > On Fri, 21 Apr 2023 at 23:16, Ranier Vilela <ranier.vf@gmail.com> wrote: > > Perhaps list_delete_nth_cell needs to check NIL too? > > + if (list == NIL) > > + return NIL; > > Which cell would you be deleting from an empty list? > None. But list_delete_nth_cel can checks a length of NIL list. Perhaps a assert? regards, Ranier Vilela
Commits
-
A minor simplification for List manipulation
- 6d56c501a75f 17.0 landed