agora inbox for pgsql-sql@postgresql.org  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alex Williams <valenceshell@protonmail.com>
Cc: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: Re: pg_dump compatibility level / use create view instead of create table/rule
Date: Wed, 09 Oct 2019 01:01:01 -0400
Message-ID: <30565.1570597261@sss.pgh.pa.us> (raw)
In-Reply-To: <NFqxoEi7-8Rw9OW0f-GwHcjvS2I4YQXov4g9OoWv3i7lVOZdLWkAWl9jQQqwEaUq6WV0vdobromhW82e8y5I0_59yZTXcZnXsrmFuldlmZc=@protonmail.com>
References: <NFqxoEi7-8Rw9OW0f-GwHcjvS2I4YQXov4g9OoWv3i7lVOZdLWkAWl9jQQqwEaUq6WV0vdobromhW82e8y5I0_59yZTXcZnXsrmFuldlmZc=@protonmail.com>

Alex Williams <valenceshell@protonmail.com> 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 create 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 in 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





view thread (12+ messages)  latest in thread

Message-ID: <30565.1570597261@sss.pgh.pa.us>
Permalink:  ../30565.1570597261@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/30565.1570597261@sss.pgh.pa.us

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, valenceshell@protonmail.com
  Subject: Re: pg_dump compatibility level / use create view instead of create table/rule
  In-Reply-To: <30565.1570597261@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 agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox