From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Subject: | Re: POC: converting Lists into arrays |
Date: | 2019-02-27 21:41:37 |
Message-ID: | 20190227214137.GA20958@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2019-Feb-27, Tom Lane wrote:
> I'm particularly unsure about whether we need two macros; though the
> way I initially tried it with just list_cell_is_last() seemed kind of
> double-negatively confusing in the places where the test needs to be
> not-last. Also, are these macro names too long, and if so what would
> be better?
I think "!list_cell_is_last()" is just as readable, if not more, than
the "is_not_last" locution:
appendStringInfoChar(&buf, '\'');
if (!list_cell_is_last(l))
appendStringInfoString(&buf, ", ");
I'd go with a single macro.
+1 for backpatching the new macros, too. I suspect extension authors
are going to need to provide compatibility versions anyway, to be
compilable against older minors.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Munro | 2019-02-27 21:43:00 | Re: Refactoring the checkpointer's fsync request queue |
Previous Message | Tom Lane | 2019-02-27 21:27:04 | Re: Why don't we have a small reserved OID range for patch revisions? |