Re: pg_dump: Sorted output, referential integrity

From: Philip Warner <pjw(at)rhyme(dot)com(dot)au>
To: Christof Petig <christof(at)petig-baender(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_dump: Sorted output, referential integrity
Date: 2001-12-07 11:54:18
Message-ID: 3.0.5.32.20011207225418.032efc90@mail.rhyme.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 |/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2001-12-07 12:05:21 New NLS status page
Previous Message Turbo Fredriksson 2001-12-07 11:53:01 Re: restoring a shadow