Re: Table versions
| От | Greg Stark |
|---|---|
| Тема | Re: Table versions |
| Дата | |
| Msg-id | 87wuaoey4g.fsf@stark.dyndns.tv обсуждение исходный текст |
| Ответ на | Re: Table versions (Tom Lane <tgl@sss.pgh.pa.us>) |
| Ответы |
Re: Table versions
|
| Список | pgsql-sql |
Tom Lane <tgl@sss.pgh.pa.us> writes:
> Returning to the original problem, it seems to me that comparing "pg_dump
> -s" output is a reasonable way to proceed.
I've actually started checking in a pg_dump -s output file into my CVS tree.
However I prune a few key lines from it. I prune the TOC OID numbers from it,
and anything not owned by the user I'm interested in.
The makefile rule I use looks like:
schema.sql:
pg_dump -U postgres -s user | sed '/^-- TOC entry/d;/^\\connect - postgres/,/^\\connect - user/d;/^SET
search_path/d;/^$$/d;/^--$$/d'> $@
This still suffers from one major deficiency. The order that objects are
outputed isn't necessarily consistent between databases. If I add tables to
the development server but then add them to the production server in a
different order the schema still shows differences even though the objects in
the two databases are identical.
--
greg
В списке pgsql-sql по дате отправления: