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

From Christof Petig
Subject pg_dump: Sorted output, referential integrity statements
Date
Msg-id 3C0F50EC.D57AC8B7@petig-baender.de
Whole thread Raw
Responses Re: pg_dump: Sorted output, referential integrity statements  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Re: pg_dump: Sorted output, referential integrity  (Philip Warner <pjw@rhyme.com.au>)
List pgsql-hackers
Hi,

While daily using pg_dump for a while the need for the following
features grew significantly.
I finally came to the point of implementing them myself ;-)

- pg_dump outputs the data unsorted 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
?)

- 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
conformant, portable and readable. But ... you might get into trouble if
the referenced table creation command is output later.

If we call this switch --sql-standard it might also prefer the short
(standard compliant) form for index creation [create index X on Y(Z,W)]
and some other things.

So, I'm kindly asking for your opinion regarding this two features.
Does anybody plan to implement them? Do you have reasons against?
  Christof




pgsql-hackers by date:

Previous
From: Karel Zak
Date:
Subject: Re: date formatting and tab-complete patch
Next
From: Hannu Krosing
Date:
Subject: Re: Licensing