Re: Deferrable on foreign keys in exported schema

Nirgal Vourgère <[email protected]> Wed, 9 Mar 2011 22:00:13 +0000
Newsgroups gmane.comp.db.mdb-tools.devel
Message-ID <[email protected]>
On Tuesday 08 March 2011 10:58:44 Peter Russell wrote:
> I'm using mdb-tools to import an Access database into Postgres, one problem
> though is that loading data into an exported schema is more difficult than it
> could be.  It would help if the generated constraints were deferrable, so that
> the data can be loaded in in any order.
> (...)

In example http://www.nirgal.com/mdbtools/debian.squeeze/mdb2pgsql script, foreign keys and indexes are output on standard output 3, so they can be processed at the end. Importing the indexes at the end really speed up the process.

You might find there usefull ideas there, such as support for tables with quotes and slashes in names, support for dates before 1000AD, sequences initialisations... On the other end, you probably don't want to add OIDS...

Cheers

------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d