pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Rework code using list_delete_cell() in MergeAttributes
Date: Wed, 05 Jun 2019 06:02:03 +0000
Message-ID: <E1hYOzr-00065k-PU@gemulon.postgresql.org> (raw)

Rework code using list_delete_cell() in MergeAttributes

When merging two attributes, we are sure that at least one remains.
However, when deleting one element in the attribute list we may finish
with an empty list returned as NIL by list_delete_cell(), but the code
failed to track that, which is not project-like.  Adjust the call so as
we check for an empty list, and make use of it in an assertion.

This has been introduced by e7b3349, when adding support for CREATE
TABLE OF.

Author: Mark Dilger
Reviewed-by: Álvaro Herrera, Michael Paquier
Discussion: https://postgr.es/m/CAE-h2TpPDqSWgOvfvSziOaMngMPwW+QZcmPpY8hQ_KOJ2+3hXQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f7e954ad1cf99a65b1785d999058898a6d56e014

Modified Files
--------------
src/backend/commands/tablecmds.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)



Message-ID: <E1hYOzr-00065k-PU@gemulon.postgresql.org>
Permalink:  ../E1hYOzr-00065k-PU@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1hYOzr-00065k-PU@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz
  Subject: Re: pgsql: Rework code using list_delete_cell() in MergeAttributes
  In-Reply-To: <E1hYOzr-00065k-PU@gemulon.postgresql.org>
  References: <E1hYOzr-00065k-PU@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox