From: | Aleksander Alekseev <aleksander(at)timescale(dot)com> |
---|---|
To: | PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Cc: | David Rowley <dgrowleyml(at)gmail(dot)com>, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com> |
Subject: | Re: Adding doubly linked list type which stores the number of items in the list |
Date: | 2022-10-31 13:28:22 |
Message-ID: | CAJ7c6TMRHfoOMM_qSF6gtP=-hRvm+q9tRDKSO100=eBF4J501Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi hackers,
> I will take another look at v3 tomorrow and probably mark it RfC.
I very much like the patch. While on it:
```
+static inline bool
+dclist_is_empty(dclist_head *head)
+{
+ Assert(dlist_is_empty(&head->dlist) == (head->count == 0));
+ return (head->count == 0);
+}
```
Should we consider const'ifying the arguments of the dlist_*/dclist_*
functions that don't change the arguments?
Additionally it doesn't seem that we have any unit tests for dlist /
dclist. Should we consider adding unit tests for them to
src/test/regress?
To clarify, IMO both questions are out of scope of this specific patch
and should be submitted separately.
--
Best regards,
Aleksander Alekseev
From | Date | Subject | |
---|---|---|---|
Next Message | Justin Pryzby | 2022-10-31 13:31:20 | Re: warn if GUC set to an invalid shared library |
Previous Message | Simon Riggs | 2022-10-31 13:24:14 | Re: Code checks for App Devs, using new options for transaction behavior |