From: Tom Lane <tgl@sss.pgh.pa.us>
To: cpainterwakefield@gmail.com
Cc: pgsql-docs@lists.postgresql.org
Subject: Re: clarification on chaining of set operations
Date: Mon, 04 Oct 2021 19:40:38 -0400
Message-ID: <4017319.1633390838@sss.pgh.pa.us> (raw)
In-Reply-To: <163338891727.12510.3939775743980651160@wrigleys.postgresql.org>
References: <163338891727.12510.3939775743980651160@wrigleys.postgresql.org>
PG Doc comments form <noreply@postgresql.org> writes:
> Regarding section 7.4 of the documentation. I was curious about the
> behavior when combining different set operations in one query, e.g,
> query1 op1 query2 op2 query3;
> where op1 and op2 are one of UNION, INTERSECT, EXCEPT.
> The documentation suggests that this is equivalent to
> (query1 op1 query2) op2 query3;
> but only states it for the case when op1 = op2 = UNION.
The SELECT reference page explains that INTERSECT binds more tightly
than UNION or EXCEPT. I think it's an oversight that section 7.4
doesn't mention that.
regards, tom lane
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, cpainterwakefield@gmail.com, pgsql-docs@lists.postgresql.org
Subject: Re: clarification on chaining of set operations
In-Reply-To: <4017319.1633390838@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