Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d9Jyb-0008RJ-Jl for pgsql-bugs@arkaria.postgresql.org; Fri, 12 May 2017 23:28:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d9Jya-0004ej-HC for pgsql-bugs@arkaria.postgresql.org; Fri, 12 May 2017 23:28:00 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d9JyY-0004eX-Vz for pgsql-bugs@postgresql.org; Fri, 12 May 2017 23:27:59 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1d9JyW-00072y-Kj for pgsql-bugs@postgresql.org; Fri, 12 May 2017 23:27:57 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v4CNRtQg018550; Fri, 12 May 2017 19:27:55 -0400 From: Tom Lane To: martellilaurent@gmail.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #14652: pg_dump: VIEW dumped as TABLE In-reply-to: <20170512221948.1796.40707@wrigleys.postgresql.org> References: <20170512221948.1796.40707@wrigleys.postgresql.org> Comments: In-reply-to martellilaurent@gmail.com message dated "Fri, 12 May 2017 22:19:48 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <18548.1494631675.1@sss.pgh.pa.us> Date: Fri, 12 May 2017 19:27:55 -0400 Message-ID: <18549.1494631675@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org martellilaurent@gmail.com writes: > Some views of are dumped as TABLE. And this is really annoying because it > has "REPLICA IDENTITY NOTHING" which is not understood if I try to restore > in 9.1. There has never been any promise that you could load output from pg_dump version X into server versions before X without manual adjustments. Furthermore, this case doesn't even pose any particular need for manual adjustments: you need only ignore the error. I see no bug here. > But if I dump the whole schema, I get a TABLE with RULE: FWIW, that typically happens when needed to break a circular dependency. In this case, since the GROUP BY is obviously inadequate to make the SELECT legal on its own, I speculate that the query is legal only because invoice_invoice.id is a primary key, so that the rule has to be emitted after that pkey constraint is created. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs