Re: pg_upgrade failed if view contain natural left join condition
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: "David G. Johnston" <david.g.johnston@gmail.com>
Cc: tushar <tushar.ahuja@enterprisedb.com>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2017-07-20T16:14:06Z
Lists: pgsql-hackers
"David G. Johnston" <david.g.johnston@gmail.com> writes: > Per the docs: > "If there are no common column names, NATURAL behaves like CROSS JOIN." > I'm being a bit pedantic here but since NATURAL is a replacement for > "ON/USING" it would seem more consistent to describe it, when no matching > columns are found, as "behaves like specifying ON TRUE" instead. Yeah, the analogy to CROSS JOIN falls down if it's an outer join. I'll go fix that. > I find it a bit strange, though not surprising, that it doesn't devolve to > "ON FALSE". No, it's normal that an AND of no conditions degenerates to TRUE. It's like omitting a WHERE clause. regards, tom lane
Commits
-
Doc: clarify description of degenerate NATURAL joins.
- 80af818dd618 9.2.22 landed
- a6088e1f5a58 9.3.18 landed
- 769eaef7600b 9.4.13 landed
- 315ca7ffb909 9.5.8 landed
- 5512427b19e7 9.6.4 landed
- ed3dc224e5aa 10.0 landed
-
Fix dumping of outer joins with empty qual lists.
- eb145fdfea91 10.0 landed
- e947838ae432 9.3.18 landed
- c2bbec9f2b36 9.5.8 landed
- 6ab4a1136ed9 9.4.13 landed
- 41ada8377492 9.6.4 landed