Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nsU88-000225-Ha for pgsql-bugs@arkaria.postgresql.org; Sat, 21 May 2022 18:47:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nsU84-0004Wt-4Y for pgsql-bugs@arkaria.postgresql.org; Sat, 21 May 2022 18:47:08 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nsU83-0004We-SO for pgsql-bugs@lists.postgresql.org; Sat, 21 May 2022 18:47:07 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nsU81-0007mr-9l for pgsql-bugs@lists.postgresql.org; Sat, 21 May 2022 18:47:06 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 24LIl2BW880599; Sat, 21 May 2022 14:47:04 -0400 From: Tom Lane To: Daniel Gustafsson cc: n.lutic@loxodata.com, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17486: [pg_restore] Restoring a view fails if this view contains an attribute without alias name. In-reply-to: References: <17486-1ad6fd786728b8af@postgresql.org> <792E8C73-EBE0-41FC-A83F-2F7A7AF4ABBB@yesql.se> <334334.1653057260@sss.pgh.pa.us> <310D60C6-5CF0-41C8-A814-3A3DE7ACF551@yesql.se> <347193.1653059973@sss.pgh.pa.us> <428377.1653066358@sss.pgh.pa.us> Comments: In-reply-to Daniel Gustafsson message dated "Fri, 20 May 2022 21:06:53 +0200" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <880597.1653158822.1@sss.pgh.pa.us> Date: Sat, 21 May 2022 14:47:02 -0400 Message-ID: <880598.1653158822@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Daniel Gustafsson writes: > On 20 May 2022, at 19:05, Tom Lane wrote: >> I thought of a compromise position that's not hard to implement: >> change the behavior only if the SELECT output column name is *possibly* >> visible elsewhere, which it is not in (for example) an EXISTS subquery. > Nice one! I think that's even better than the previous version actually. > Skimming the patch it seems like a reasonable approach. Pushed, thanks for looking. regards, tom lane