pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Florian Gossin <fluancefg@gmail.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: Can't restore view with pg_restore
Date: Wed, 24 May 2017 11:39:38 -0400
Message-ID: <2329.1495640378@sss.pgh.pa.us> (raw)
In-Reply-To: <CAPW7RP=YgN+sa_TV2OvQ5404bJ9vA9_YAOd7upJNiNLbtg4qvw@mail.gmail.com>
References: <CAPW7RP=YgN+sa_TV2OvQ5404bJ9vA9_YAOd7upJNiNLbtg4qvw@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Florian Gossin <fluancefg@gmail.com> writes:
> I'm doing a dump in directory format of database with several schemas using
> pg_dump and when I try to restore it using pg_restore, I get the following
> error:

> ERROR:  could not convert table "bmv_visits_list" to a view because it has
> triggers
> STATEMENT:  CREATE RULE "_RETURN" AS
> ON SELECT TO bmv_visits_list DO INSTEAD  SELECT patient.firstname,

Hm, seems like pg_dump is trying to dump the various bits of the view
in the wrong order.  But since we haven't seen reports of this before,
there must be something odd about your schema to trigger it.  Can you do
a plain "pg_dump -s" and show us the parts relating to this view and its
underlying tables?

			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



view thread (7+ messages)  latest in thread

Message-ID: <2329.1495640378@sss.pgh.pa.us>
Permalink:  ../2329.1495640378@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2329.1495640378@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 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, fluancefg@gmail.com
  Subject: Re: Can't restore view with pg_restore
  In-Reply-To: <2329.1495640378@sss.pgh.pa.us>
  References: <CAPW7RP=YgN+sa_TV2OvQ5404bJ9vA9_YAOd7upJNiNLbtg4qvw@mail.gmail.com> <2329.1495640378@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