Re: Improve list manipulation in several places - Mailing list pgsql-hackers

From Ranier Vilela
Subject Re: Improve list manipulation in several places
Date
Msg-id CAEudQAowjQEWP80yxo4UBJV1Egkj76HKP-8FbHRpJwiJBV=CFQ@mail.gmail.com
Whole thread Raw
In response to Re: Improve list manipulation in several places  (David Rowley <dgrowleyml@gmail.com>)
List 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

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Order changes in PG16 since ICU introduction
Next
From: Steinar Kaldager
Date:
Subject: Improving worst-case merge join performance with often-null foreign key