Replacing lfirst() with lfirst_node() appropriately in planner.c

From: Ashutosh Bapat <ashutosh(dot)bapat(at)enterprisedb(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Replacing lfirst() with lfirst_node() appropriately in planner.c
Date: 2017-07-13 05:27:42
Message-ID: CAFjFpRcNr3r=u0ni=7A4GD9NnHQVq+dkFafzqo2rS6zy=dt1eg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

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. I
have covered all the occurences of lfirst() except
1. those extract generic pointers like Path, Plan etc.
2. those extract any node as Aggref, Var and then check using IsA()
3. those extracting some pointers other than nodes.

"make check" runs without any failure.

Are we carrying out such replacements in master or this will be
considered for v11?

--
Best Wishes,
Ashutosh Bapat
EnterpriseDB Corporation
The Postgres Database Company

Attachment Content-Type Size
pg_lfirst_node_planner_c.patch application/octet-stream 14.3 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2017-07-13 06:31:04 Update description of \d[S+] in \?
Previous Message Amit Langote 2017-07-13 05:17:45 Re: New partitioning - some feedback