Re: import/export or moving data between databases - Mailing list pgsql-general

From Iavor Raytchev
Subject Re: import/export or moving data between databases
Date
Msg-id HKEIIDPFPDBMOMDLIEEGGEJKGPAA.pobox@verysmall.org
Whole thread Raw
In response to Re: import/export or moving data between databases  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: import/export or moving data between databases  ("D. Stimits" <stimits@comcast.net>)
List pgsql-general
Dear Tom,

We kind of read all documentation we could find, but that was the only way
we could get -

- export db structure into sql file
- export the records we need into another sql file
- import structure
- turn off triggers
- import the records
- turn on triggers

The main problem is that we export selected records - not the whole database
and not even whole tables. Also we export 5 000 to 15 000 such sets that
have small size - just a fraction of the size of the main database.

Can pg_dump help in that more than we use it?

Best,

Iavor

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Sunday, September 19, 2004 6:45 PM
To: Iavor Raytchev
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] import/export or moving data between databases


"Iavor Raytchev" <pobox@verysmall.org> writes:
> The problem we face is -

>     When we start to import - the triggers are executed - which must not
happen. We found a way to turn the triggers off for the time of import and
then turn them on after the import. However we can turn the triggers off
only per table - so we need the list of tables, but we have not found a
reliable way to get it. We can get them from the pg_ system tables - but
this means if there is a change in them in next version - we need to change
our software, which is not very desirable.

It sounds to me like you have reinvented pg_dump ... and not done it
very well.  Why don't you just use pg_dump?

            regards, tom lane



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: import/export or moving data between databases
Next
From: Michael Fuhr
Date:
Subject: Re: Problem in converting int to timestamp value - why?