- dumping a tables' 'subtree'

From: Marek PUBLICEWICZ <M(dot)Publicewicz(at)elka(dot)pw(dot)edu(dot)pl>
To: <M(dot)Publicewicz(at)elka(dot)pw(dot)edu(dot)pl>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: - dumping a tables' 'subtree'
Date: 2001-04-02 07:50:38
Message-ID: Pine.SOL.4.30.0104020936400.17108-100000@elektron.elka.pw.edu.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I'd like to ask, if anyone has written a tool, allowing to
dump the tables (both the schema and the data), basing on the
'base' table_name, specified by the user. The tables that the database
consists of, form a tree (as a result of the relations), so what I'm
looking for is a program (script), issuing the 'DROP *', 'CREATE *', 'COPY
FROM ' commands in the proper order. pg-dump dumps the whole 'tree' - I'd
like to be able to specify myself the 'root' of this 'tree'.

I realize, that my influency in English makes the description more vague,
than it should be :) sorry.

regards, mark

PS. The reason why I feel I'm in need of suach a thing is that in general,
when I try do pg_dump the database I'm working with, I get the errors -
sometimes the inherited constraints seem to be unappropriate (both in
terms of definitions and with their names), the COPY FROM clause sometimes
also (starting with a particular row) generates error. Analyzing this
would be much more simple, if I focus on the 'subset' of the whole dump -
200+ tables for me is just too big bunch of info.

The other reason is, that all the tables form (logically) several parts -
I keep them together, because the parts interact (joins occur) between one
another. And I'd like to be able to dump a specific logical part.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Eric G. Miller 2001-04-02 08:04:19 Re: function to operate on same fields, different records?
Previous Message Jeremy Radlow 2001-04-02 07:19:12 Cascading deletes with rules in 7.0.3: why doesn't this work?