Re: clarification on chaining of set operations
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: cpainterwakefield@gmail.com
Cc: pgsql-docs@lists.postgresql.org
Date: 2021-10-04T23:40:38Z
Lists: pgsql-docs
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
Commits
-
Doc: improve description of UNION/INTERSECT/EXCEPT syntax.
- abc037b65882 11.14 landed
- 129ac7d34911 10.19 landed
- 086cda1d9823 9.6.24 landed
- f3fec23dbdea 15.0 landed
- cb8a5a588eb7 14.1 landed
- b6cf89b025f8 12.9 landed
- 9024a35c11d7 13.5 landed