Re: Small improvements to pg_list.h's linitial(), lsecond(), lthird() etc macros

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: David Rowley <dgrowleyml@gmail.com>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2020-09-29T00:37:52Z
Lists: pgsql-hackers
David Rowley <dgrowleyml@gmail.com> writes:
> Yeah, I understand that part.  The pain I was talking about was
> writing a patch for master, trying to apply it to the previous version
> only to find it does not apply. After fixing it up for that version
> trying to apply that patch to the version before that and getting more
> conflicts. Repeating that down to our earliest supported version is
> something I'd really love to never have to do again.

Tell me about it :-(.  I've spent countless hours on that sort
of activity.  So I really dislike changing an API and then changing
it again in the next release.

			regards, tom lane



Commits

  1. Add for_each_from, to simplify loops starting from non-first list cells.

  2. Minor mop-up for List improvements.

  3. Improve pg_list.h's linitial(), lsecond() and co macros