Re: nitpick about poor style in MergeAttributes

Alvaro Herrera <alvherre@2ndquadrant.com>

From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Mark Dilger <hornschnorter@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>, Tom Lane <tgl@sss.pgh.pa.us>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2019-06-04T20:18:30Z
Lists: pgsql-hackers
On 2019-May-23, Mark Dilger wrote:

> On Thu, May 23, 2019 at 5:24 PM Michael Paquier <michael@paquier.xyz> wrote:

> > Looking closer, this code is not new as of v12.  We have that since
> > e7b3349 which has introduced CREATE TABLE OF.

Yeah, I was not quite understanding why it was being blamed on a commit
that actually *removed* one other callsite that did the same thing.  (I
didn't actually realize at the time that this bug was there, mind.)

> > Anyway, I think that assigning the result of list_delete_cell and
> > adding an assertion like in the attached are saner things to do.

Looks good to me.

-- 
Álvaro Herrera                https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



Commits

  1. Rework code using list_delete_cell() in MergeAttributes