Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iI462-0004YI-GJ for pgsql-sql@arkaria.postgresql.org; Wed, 09 Oct 2019 05:01:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iI461-0001bT-EF for pgsql-sql@arkaria.postgresql.org; Wed, 09 Oct 2019 05:01:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iI461-0001bK-5q for pgsql-sql@lists.postgresql.org; Wed, 09 Oct 2019 05:01:09 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iI45y-0005ja-MM for pgsql-sql@postgresql.org; Wed, 09 Oct 2019 05:01:08 +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 x99512YG030572; Wed, 9 Oct 2019 01:01:02 -0400 From: Tom Lane To: Alex Williams cc: "pgsql-sql@postgresql.org" Subject: Re: pg_dump compatibility level / use create view instead of create table/rule In-reply-to: References: Comments: In-reply-to Alex Williams message dated "Wed, 09 Oct 2019 01:01:39 -0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <30563.1570597261.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 09 Oct 2019 01:01:01 -0400 Message-ID: <30565.1570597261@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Alex Williams writes: > Can someone let me know when you're doing a pg_dump, can you specify not= to use the view rules so that the statement in the pg_dump file uses crea= te view instead of create table/create rule? No. > We dump from 9.5.5 and restore to one 9.5.18 server and two 9.2 servers.= ...we've been doing this for awhile and had no issues until recently with = certain views that are trying to be restored with rule views (some views i= n the pg_dump file are created with create view and some by create table /= create rule) In general, we don't promise that pg_dump output from major version N can be loaded into previous major versions. Having said that, 9.2 should not have a problem with either the CREATE VIEW or CREATE TABLE- plus-CREATE RULE approaches per se, so there's some critical detail that you haven't told us about. You didn't show the actual error messages, either. regards, tom lane