Re: pg_dump: Sorted output, referential integrity - Mailing list pgsql-hackers

From Philip Warner
Subject Re: pg_dump: Sorted output, referential integrity
Date
Msg-id 3.0.5.32.20011207225418.032efc90@mail.rhyme.com.au
Whole thread Raw
In response to pg_dump: Sorted output, referential integrity statements  (Christof Petig <christof@petig-baender.de>)
Responses Re: pg_dump: Sorted output, referential integrity  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-hackers
At 12:05 6/12/01 +0100, Christof Petig wrote:
>
>- pg_dump outputs the data unsorted

Not quite correct; it outputs them in an order that is designed to improve
the chances of dependencies being satisfied, and improve the performance of
a full restore (a modified OID order).

> but to manage the data in a version
>control system you need it consistently sorted. So a flag to sort by
>either primary key or left to right would be of great value. (--sorted
>?)

Not really very generalizable when you consider user defined types,
triggers etc.


>- pg_dump outputs referential constraints as 3 triggers (near to two
>different tables) per constraint. A mode which outputs the original
>statement (alter table ... add constraint) would be more sql standard

Abosolutely; with time we are moving pg_dump to use standard SQL.


>So, I'm kindly asking for your opinion regarding this two features.
>Does anybody plan to implement them?

No plans for the first one, but sorting by ('object-type', 'object-name')
would be close to trivial, if there is much interest/support for it.

The second (SQL conformance) is high on my list; a few people (Chris &
Stephen?) have been working hard to implement 'alter table add/etc
constraint'. When this is stable, we will move pg_dump in that direction.
But as of 7.1, there were still wrinkles in the the implementation that
meant it was unsuitable for pg_dump. Not sure about the status in 7.2.


----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/


pgsql-hackers by date:

Previous
From: Turbo Fredriksson
Date:
Subject: Re: restoring a shadow
Next
From: Peter Eisentraut
Date:
Subject: New NLS status page