pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: David Rowley <drowley@postgresql.org>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: pg_dump, ATTACH, and independently restorable child partitions
Date: Fri, 04 Dec 2020 12:13:05 -0500
Message-ID: <2168110.1607101985@sss.pgh.pa.us> (raw)
In-Reply-To: <20201202225013.GJ24052@telsasoft.com>
References: <20201024195949.GL9241@telsasoft.com>
	<20201107021835.GA13348@alvherre.pgsql>
	<20201120152055.GF24784@telsasoft.com>
	<577158.1606347319@sss.pgh.pa.us>
	<20201202225013.GJ24052@telsasoft.com>

Justin Pryzby <pryzby@telsasoft.com> writes:
> [ v4-0001-pg_dump-output-separate-object-for-ALTER-TABLE.AT.patch ]

The cfbot is being picky about this:

3218pg_dump.c: In function ‘dumpTableAttach’:
3219pg_dump.c:15600:42: error: suggest parentheses around comparison in operand of ‘&’ [-Werror=parentheses]
3220  if (attachinfo->partitionTbl->dobj.dump & DUMP_COMPONENT_DEFINITION == 0)
3221                                          ^
3222cc1: all warnings being treated as errors

which if I've got the precedence straight is indeed a bug.

Personally I'd probably write

    if (!(attachinfo->partitionTbl->dobj.dump & DUMP_COMPONENT_DEFINITION))

as it seems like a boolean test to me.

			regards, tom lane





view thread (11+ messages)  latest in thread

Message-ID: <2168110.1607101985@sss.pgh.pa.us>
Permalink:  ../2168110.1607101985@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2168110.1607101985@sss.pgh.pa.us

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, pryzby@telsasoft.com, alvherre@alvh.no-ip.org, drowley@postgresql.org, pgsql-hackers@lists.postgresql.org
  Subject: Re: pg_dump, ATTACH, and independently restorable child partitions
  In-Reply-To: <2168110.1607101985@sss.pgh.pa.us>

* 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