Re: Propose a new function - list_is_empty

From: Peter Smith <smithpb2250(at)gmail(dot)com>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Propose a new function - list_is_empty
Date: 2022-08-17 01:09:44
Message-ID: CAHut+PtXDv-BuWa6y+2g9MbKfmaXpD6VCQyDVdFsw_Cqi1rz0g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 17, 2022 at 6:34 AM Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
>
> > On 16 Aug 2022, at 16:03, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> > I agree though that while simplifying list_length() calls, I'd lean to using
> > explicit comparisons to NIL.
>
>
> Agreed, I prefer that too.
>

Thanks for the feedback.

PSA patch v3 which now uses explicit comparisons to NIL everywhere,
and also addresses the other review comments.

------
Kind Regards,
Peter Smith.
Fujitsu Australia

Attachment Content-Type Size
v3-0001-use-NIL-test-for-empty-List-checks.patch application/octet-stream 18.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-08-17 01:14:31 Re: build remaining Flex files standalone
Previous Message Andres Freund 2022-08-17 00:57:40 Re: hash_xlog_split_allocate_page: failed to acquire cleanup lock