pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: tushar <tushar.ahuja@enterprisedb.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: pg_upgrade failed if view contain natural left join condition
Date: Thu, 20 Jul 2017 09:53:23 -0400
Message-ID: <7383.1500558803@sss.pgh.pa.us> (raw)
In-Reply-To: <98b283cd-6dda-5d3f-f8ac-87db8c76a3da@enterprisedb.com>
References: <98b283cd-6dda-5d3f-f8ac-87db8c76a3da@enterprisedb.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

tushar <tushar.ahuja@enterprisedb.com> 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



view thread (5+ messages)  latest in thread

Message-ID: <7383.1500558803@sss.pgh.pa.us>
Permalink:  ../7383.1500558803@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7383.1500558803@sss.pgh.pa.us

 · 

reply

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-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, tushar.ahuja@enterprisedb.com
  Subject: Re: pg_upgrade failed if view contain natural left join condition
  In-Reply-To: <7383.1500558803@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