From: Tom Lane <tgl@sss.pgh.pa.us>
To: martellilaurent@gmail.com
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #14652: pg_dump: VIEW dumped as TABLE
Date: Fri, 12 May 2017 19:27:55 -0400
Message-ID: <18549.1494631675@sss.pgh.pa.us> (raw)
In-Reply-To: <20170512221948.1796.40707@wrigleys.postgresql.org>
References: <20170512221948.1796.40707@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
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
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, martellilaurent@gmail.com
Subject: Re: BUG #14652: pg_dump: VIEW dumped as TABLE
In-Reply-To: <18549.1494631675@sss.pgh.pa.us>
References: <20170512221948.1796.40707@wrigleys.postgresql.org> <18549.1494631675@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 DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox