Re: [HACKERS] pg_upgrade failed if view contain natural left join condition

2017-07-20 Thread Tom Lane
"David G. Johnston" 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

Re: [HACKERS] pg_upgrade failed if view contain natural left join condition

2017-07-20 Thread David G. Johnston
On Thu, Jul 20, 2017 at 6:53 AM, Tom Lane wrote: > tushar writes: > > postgres=# create table t(n int); > > CREATE TABLE > > postgres=# create table t1(a int); > > CREATE TABLE > > postgres=# create view ttt1 as SELECT e.n FROM t e NATURAL LEFT JOIN t1 > d; > > CREATE VIEW > > You realize of cou

Re: [HACKERS] pg_upgrade failed if view contain natural left join condition

2017-07-20 Thread Tom Lane
tushar writes: > postgres=# create table t(n int); > CREATE TABLE > postgres=# create table t1(a int); > CREATE TABLE > postgres=# create view ttt1 as SELECT e.n FROM t e NATURAL LEFT JOIN t1 d; > CREATE VIEW You realize of course that that's a pretty useless join definition. Still, yes, we do ne

Re: [HACKERS] pg_upgrade failed if view contain natural left join condition

2017-07-20 Thread Thom Brown
On 20 July 2017 at 13:09, tushar wrote: > Steps to reproduce - > > v9.6 > > postgres=# create table t(n int); > CREATE TABLE > postgres=# create table t1(a int); > CREATE TABLE > postgres=# create view ttt1 as SELECT e.n FROM t e NATURAL LEFT JOIN t1 d; > CREATE VIEW > > v10 - > > run pg_upgrade -