pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Daniel Cristian Cruz <danielcristian@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6050: Dump and restore of view after a schema change: can't restore the view
Date: Fri, 03 Jun 2011 13:19:27 -0400
Message-ID: <1357.1307121567@sss.pgh.pa.us> (raw)
In-Reply-To: <BANLkTikhmPtzZQNPPJ7vfsaHsEq8e5Sc-Q@mail.gmail.com>
References: <201106031238.p53CcA8P075374@wwwmaster.postgresql.org>
	<27042.1307113140@sss.pgh.pa.us>
	<BANLkTikhmPtzZQNPPJ7vfsaHsEq8e5Sc-Q@mail.gmail.com>

Robert Haas <robertmhaas@gmail.com> writes:
> On Fri, Jun 3, 2011 at 10:59 AM, Tom Lane <tgl@sss.pgh.pa.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



view thread (22+ messages)  latest in thread

Message-ID: <1357.1307121567@sss.pgh.pa.us>
Permalink:  ../1357.1307121567@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1357.1307121567@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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, danielcristian@gmail.com
  Subject: Re: BUG #6050: Dump and restore of view after a schema change: can't restore the view
  In-Reply-To: <1357.1307121567@sss.pgh.pa.us>
  References: <201106031238.p53CcA8P075374@wwwmaster.postgresql.org> <27042.1307113140@sss.pgh.pa.us> <BANLkTikhmPtzZQNPPJ7vfsaHsEq8e5Sc-Q@mail.gmail.com> <1357.1307121567@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