Re: pg_upgrade failed if view contain natural left join condition

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: tushar <tushar(dot)ahuja(at)enterprisedb(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_upgrade failed if view contain natural left join condition
Date: 2017-07-20 13:53:23
Message-ID: 7383.1500558803@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

tushar <tushar(dot)ahuja(at)enterprisedb(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-07-20 13:59:37 Re: Cache lookup errors with functions manipulation object addresses
Previous Message Tom Lane 2017-07-20 13:48:17 Re: pg_upgrade failed if view is based on sequence