Re: [HACKERS] Replacing lfirst() with lfirst_node() appropriately in planner.c
От | Jeevan Chalke |
---|---|
Тема | Re: [HACKERS] Replacing lfirst() with lfirst_node() appropriately in planner.c |
Дата | |
Msg-id | CAM2+6=VPp2MoVHWy9ybabv4YWcrYNmTHT37=tFk-XnHmXb2buw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] Replacing lfirst() with lfirst_node() appropriately in planner.c (Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>) |
Ответы |
Re: [HACKERS] Replacing lfirst() with lfirst_node() appropriately in planner.c
|
Список | pgsql-hackers |
Hi,
lfirst_node() changes are missing for List node type and I was thinking
about adding those. But it looks like we cannot do so as List can be a
T_List, T_IntList, or T_OidList. So I am OK with that.
Apart from this, changes look good to me. Everything works fine.
As we are now doing it for lfirst(), can we also do this for linitial()?
I did not find any usage for lsecond(), lthird(), lfourth() and llast()
though.
Attached patch for replacing linitial() with linital_node() appropriately in
planner.c
Thankslfirst_node() changes are missing for List node type and I was thinking
about adding those. But it looks like we cannot do so as List can be a
T_List, T_IntList, or T_OidList. So I am OK with that.
Apart from this, changes look good to me. Everything works fine.
As we are now doing it for lfirst(), can we also do this for linitial()?
I did not find any usage for lsecond(), lthird(), lfourth() and llast()
though.
Attached patch for replacing linitial() with linital_node() appropriately in
planner.c
On Fri, Jul 14, 2017 at 2:25 PM, Ashutosh Bapat <ashutosh.bapat@enterprisedb.com> wrote:
On Thu, Jul 13, 2017 at 9:15 PM, Alvaro Herrera
<alvherre@2ndquadrant.com> wrote:
> Ashutosh Bapat wrote:
>
>> Happened to stumble across some instances of lfirst() which could use
>> lfirst_node() in planner.c. Here's patch which replaces calls to
>> lfirst() extracting node pointers by lfirst_node() in planner.c.
>
> Sounds good.
>
>> Are we carrying out such replacements in master or this will be
>> considered for v11?
>
> This is for pg11 definitely; please add to the open commitfest.
Thanks. Added. https://commitfest.postgresql.org/14/1195/
--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
--
Jeevan Chalke
Principal Software Engineer, Product Development
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
Principal Software Engineer, Product Development
EnterpriseDB Corporation
The Enterprise PostgreSQL Company
Вложения
В списке pgsql-hackers по дате отправления: