Predictable order of SQL commands in pg_dump
| От | Dmitry Koterov |
|---|---|
| Тема | Predictable order of SQL commands in pg_dump |
| Дата | |
| Msg-id | d7df81620809201805m470993c2o816bc62124c77bf6@mail.gmail.com обсуждение исходный текст |
| Ответы |
Re: Predictable order of SQL commands in pg_dump
|
| Список | pgsql-hackers |
Hello.
Utility pg_dump dumps the identical database schemas not always
identically: sometimes it changes an order of SQL statements.
E.g.:
1. Dump of database A:
ALTER TABLE xxx ADD CONSTRAINT ...;
ALTER TABLE yyy ADD CONSTRAINT ...;
2. Dump of database B which has identical structure as A ("pg_dump A |
psql -d B" was executed)
ALTER TABLE yyy ADD CONSTRAINT ...;
ALTER TABLE xxx ADD CONSTRAINT ...;
This behaviour is not good, because I cannot execute diff to visually
view what was changed between databases A and B. (I use this diff only
for visual detection, please do not refer I want to use this diff for
schema migration - I don't want it!).
Is it possible to make pg_dump more predictable in SQL ordering?
What order does it use by default?
В списке pgsql-hackers по дате отправления: