Re: Some clean-up work in get_cheapest_group_keys_order() - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Some clean-up work in get_cheapest_group_keys_order()
Date
Msg-id 1986787.1657666922@sss.pgh.pa.us
Whole thread Raw
In response to Some clean-up work in get_cheapest_group_keys_order()  (David Rowley <dgrowleyml@gmail.com>)
Responses Re: Some clean-up work in get_cheapest_group_keys_order()
List pgsql-hackers
David Rowley <dgrowleyml@gmail.com> writes:
> * I think list_truncate(list_copy(list), n) is a pretty bad way to
> copy the first n elements of a list, especially when n is likely to be
> 0 most of the time. I think we should just add a function called
> list_copy_head(). We already have list_copy_tail().

Agreed, but I think there are other instances of that idiom that
should be cleaned up while you're at it.

> I think the first 3 are worth fixing in PG15 since all that code is
> new to that version. The 4th, I'm so sure about.

I'd say keeping v15 and v16 in sync here is worth something.

            regards, tom lane



pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Some clean-up work in get_cheapest_group_keys_order()
Next
From: Jacob Champion
Date:
Subject: Re: [PATCH] Log details for client certificate failures