Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 17ED0B5F472 for ; Tue, 7 Jun 2011 11:33:13 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 62983-02 for ; Tue, 7 Jun 2011 14:33:06 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 087FBB5F4CB for ; Tue, 7 Jun 2011 11:33:05 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p57EX5Wn012930; Tue, 7 Jun 2011 10:33:05 -0400 (EDT) To: Greg Stark cc: pgsql-bugs@postgresql.org, Daniel Cristian Cruz Subject: Re: Re: BUG #6050: Dump and restore of view after a schema change: can't restore the view In-reply-to: References: <201106031238.p53CcA8P075374@wwwmaster.postgresql.org> <27042.1307113140@sss.pgh.pa.us> Comments: In-reply-to Greg Stark message dated "Tue, 07 Jun 2011 03:57:51 -0700" Date: Tue, 07 Jun 2011 10:33:05 -0400 Message-ID: <12928.1307457185@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201106/63 X-Sequence-Number: 30442 Greg Stark writes: > On Jun 3, 2011 4:20 PM, "Tom Lane" 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