pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Armel HERVE <ah.pgsql@laposte.net>
To: pgsql-admin@postgresql.org
Subject: Re: Problem with pg_dump / pg_restore
Date: Mon, 1 Dec 2003 10:43:30 +0100
Message-ID: <CGEBLCNHICNOBNMINIICGEDMCDAA.ah.pgsql@laposte.net> (raw)
In-Reply-To: <bqevun$1g4q$1@news.hub.org>


Hi Mark,

in fact, the problem is in the structure backup: this command doesn't care
about views dependencies. It take views in creation order to put its in
the .sql. So I have to reorder manually this view creations.
I made a view (another...) to look for dependencies. Maybe it's the good
way.

This view give, for each view oid, the dependencies:
SELECT dep.objid,
	 (SELECT pg_rewrite.ev_class
        FROM pg_rewrite
        WHERE (pg_rewrite.oid = dep.objid )) AS trueoid,
       dep.refobjid
FROM pg_depend dep, pg_rewrite rew, pg_class "class"
WHERE dep.objid >= 30000
  AND rew.oid = dep.objid
  AND dep.refobjid = "class".oid
  AND "class".relkind = 'v'
  AND rew.ev_class <> dep.refobjid;


Armel


-----Message d'origine-----
De : pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org]De la part de Mark Carew
Envoyé : lundi 1 décembre 2003 10:00
À : pgsql-admin@postgresql.org
Objet : Re: [ADMIN] Problem with pg_dump / pg_restore



Hi Armel,

    Why not do a structure only dump to plain text and see if you can use
that as your start .sql ext file for 'psql -e .. etc'. Eliminates the
necessity to have an active client side data dictionary. BTW, your english
is fine.

Regards
markcarew@
magicwanddept.com.au



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)




view thread (6+ messages)

Message-ID: <CGEBLCNHICNOBNMINIICGEDMCDAA.ah.pgsql@laposte.net>
Permalink:  ../CGEBLCNHICNOBNMINIICGEDMCDAA.ah.pgsql@laposte.net/
Also on:    postgresql.org/message-id/CGEBLCNHICNOBNMINIICGEDMCDAA.ah.pgsql@laposte.net

 · 

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-admin@postgresql.org
  Cc: ah.pgsql@laposte.net
  Subject: Re: Problem with pg_dump / pg_restore
  In-Reply-To: <CGEBLCNHICNOBNMINIICGEDMCDAA.ah.pgsql@laposte.net>
  References: <bqevun$1g4q$1@news.hub.org> <CGEBLCNHICNOBNMINIICGEDMCDAA.ah.pgsql@laposte.net>

* 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