From: Tom Lane <tgl@sss.pgh.pa.us>
To: Greg Stark <gsstark@gmail.com>
Cc: pgsql-bugs@postgresql.org
Cc: Daniel Cristian Cruz <danielcristian@gmail.com>
Subject: Re: Re: BUG #6050: Dump and restore of view after a schema change: can't restore the view
Date: Tue, 07 Jun 2011 10:33:05 -0400
Message-ID: <12928.1307457185@sss.pgh.pa.us> (raw)
In-Reply-To: <BANLkTi=LjpFomFKwXUwkTbd5jUkJh52V6Q@mail.gmail.com>
References: <201106031238.p53CcA8P075374@wwwmaster.postgresql.org>
<27042.1307113140@sss.pgh.pa.us>
<BANLkTiku=BUgreu-ksHooRdgBtLDZJOP7Q@mail.gmail.com>
<BANLkTi=LjpFomFKwXUwkTbd5jUkJh52V6Q@mail.gmail.com>
Greg Stark <gsstark@gmail.com> writes:
> On Jun 3, 2011 4:20 PM, "Tom Lane" <tgl@sss.pgh.pa.us> wrote:
>> I'm inclined to write this off as "so don't do that". There's nothing
>> that pg_dump can do to make this work: it has to use the USING syntax
>> for the join, and that doesn't offer any way to qualify the column name
>> on just one side.
> There's nothing stopping us from adding a nonstandard syntax to cover
> precisely the information needed to resolve this case when dumping.
> For example we could support USING (a.a=b.a) or ON (a.a=b.a as a)
1. "Nonstandard syntax" is widely seen as "vendor lock-in". I don't
think that people would appreciate such a fix, especially for an issue
so obscure that we've never seen it before.
2. I don't believe your proposal covers all cases. For instance, there
are cases where there is no valid qualified name for a column, ie, it's
a merged column from an alias-less JOIN. (The existence of such cases
is another reason why USING sucks, but I digress.)
> We could use it only in this case where there's ambiguity too so it wouldn't
> clutter people's dumps.
No, because the problem case is where ambiguity gets added after the
fact.
regards, tom lane
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, gsstark@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: <12928.1307457185@sss.pgh.pa.us>
References: <201106031238.p53CcA8P075374@wwwmaster.postgresql.org> <27042.1307113140@sss.pgh.pa.us> <BANLkTiku=BUgreu-ksHooRdgBtLDZJOP7Q@mail.gmail.com> <BANLkTi=LjpFomFKwXUwkTbd5jUkJh52V6Q@mail.gmail.com> <12928.1307457185@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