From: Tom Lane <tgl@sss.pgh.pa.us>
To: nick.rutherford@gmail.com
Cc: pgsql-docs@postgresql.org
Subject: Re: EXCLUDE logical wording: "not all" should be "none"
Date: Mon, 06 Mar 2017 20:50:22 -0500
Message-ID: <1040.1488851422@sss.pgh.pa.us> (raw)
In-Reply-To: <20170306103912.25050.61015@wrigleys.postgresql.org>
References: <20170306103912.25050.61015@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-docs>
nick.rutherford@gmail.com writes:
> The EXCLUDE docs say
> "The EXCLUDE clause defines an exclusion constraint, which guarantees that
> if any two rows are compared on the specified column(s) or expression(s)
> using the specified operator(s), not all of these comparisons will return
> TRUE."
> It also says "for equality, this is equivalent to a UNIQUE constraint".
> The current documentation saying "not all" is not the same as a unique
> constraint, because in the case of equality, it is logically stating that
> "All rows - 1 can be equal", which satisfies "not all" pairs. Instead it
> should say that no pairs, or none, return true.
Hmm. I think what that text means by "not all of these comparisons" is
"not all of these column comparisons", whereas you seem to be reading it
as talking about comparison of the whole row to all other rows in the
table. Am I misunderstanding your point?
(I agree that this text could use improvement, but your proposed edit
seems wrong in detail. The quantifier across the whole table is already
there in the bit about "if any two rows".)
regards, tom lane
--
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
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-docs@postgresql.org
Cc: tgl@sss.pgh.pa.us, nick.rutherford@gmail.com
Subject: Re: EXCLUDE logical wording: "not all" should be "none"
In-Reply-To: <1040.1488851422@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