Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYBuv-0008T8-91 for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Jul 2017 13:55:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dYBuu-0007z2-Lp for pgsql-hackers@arkaria.postgresql.org; Thu, 20 Jul 2017 13:55:00 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dYBtP-0005Ee-3g for pgsql-hackers@postgresql.org; Thu, 20 Jul 2017 13:53:27 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dYBtM-0004Rp-LD for pgsql-hackers@postgresql.org; Thu, 20 Jul 2017 13:53:25 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v6KDrNic007384; Thu, 20 Jul 2017 09:53:23 -0400 From: Tom Lane To: tushar cc: PostgreSQL-development Subject: Re: pg_upgrade failed if view contain natural left join condition In-reply-to: <98b283cd-6dda-5d3f-f8ac-87db8c76a3da@enterprisedb.com> References: <98b283cd-6dda-5d3f-f8ac-87db8c76a3da@enterprisedb.com> Comments: In-reply-to tushar message dated "Thu, 20 Jul 2017 17:39:43 +0530" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <7382.1500558803.1@sss.pgh.pa.us> Date: Thu, 20 Jul 2017 09:53:23 -0400 Message-ID: <7383.1500558803@sss.pgh.pa.us> List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org 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 need to reverse-list the view with correct syntax. Probably t LEFT JOIN t1 ON TRUE would do it. > I think -this issue should be there in the older branches as well but > not checked that. [experiments] Seems to be wrong back to 9.3. Although I have a feeling this might be a mistake in a back-patched bug fix, so that it'd depend on which 9.3.x you looked at. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers