Re: BUG #6050: Dump and restore of view after a schema change: can't restore the view

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Daniel Cristian Cruz <danielcristian(at)gmail(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #6050: Dump and restore of view after a schema change: can't restore the view
Date: 2011-06-03 17:19:27
Message-ID: 1357.1307121567@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Fri, Jun 3, 2011 at 10:59 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Personally my advice is to avoid USING: it wasn't one of the SQL
>> committee's better ideas.

> I don't understand why we can't just translate the USING into some
> equivalent construct that doesn't involve USING.

There is no directly equivalent construct, because USING changes the
shape of the output table (the join has one fewer output column than
would exist without USING).

Now, if the query doesn't involve any explicit reference to "joinalias.*",
we could probably fake it with some ugly thing involving
COALESCE(leftcol, rightcol) ... but I don't think people will want to
read that, and anyway the idea falls apart as soon as you do have a
whole-row reference.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2011-06-03 17:29:56 Re: BUG #6050: Dump and restore of view after a schema change: can't restore the view
Previous Message Kevin Grittner 2011-06-03 17:18:12 Re: BUG #6050: Dump and restore of view after a schema change: can't restore the view