dbTalk Databases Forums  

Comparing database schema's

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss Comparing database schema's in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Frank Kurzawa
 
Posts: n/a

Default Comparing database schema's - 08-02-2004 , 05:04 PM






How are people doing automated comparisons of schemas in different databases?

E.g. we have a dev database, a beta database, and a production database. We
need to insure that changes in schema are propagated properly during the
development and deployment process.

I've experimented some with 'pg_dump -s' to do this: Do a schema dump on the two
databases and a diff. But due to myriad small differences (order of creation
of tables, constraints, etc.) it is very difficult to get a usable diff without
engaging in massive massage of the dump output, including dumping a table at a time.

I found a reference to a schema comparison tool in the mailing list archives, but
it appears to be far out of date and not currently supported.

Regards,

Frank


---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match


Reply With Quote
  #2  
Old   
Gaetano Mendola
 
Posts: n/a

Default Re: Comparing database schema's - 08-02-2004 , 05:19 PM






Frank Kurzawa wrote:

Quote:
How are people doing automated comparisons of schemas in different databases?

E.g. we have a dev database, a beta database, and a production database. We
need to insure that changes in schema are propagated properly during the
development and deployment process.

I've experimented some with 'pg_dump -s' to do this: Do a schema dump on the two
databases and a diff. But due to myriad small differences (order of creation
of tables, constraints, etc.) it is very difficult to get a usable diff without
engaging in massive massage of the dump output, including dumping a table at a time.

I found a reference to a schema comparison tool in the mailing list archives, but
it appears to be far out of date and not currently supported.
Consider to use the EMS tool postgres comparer:

http://www.ems-hitech.com/pgsqlutils/


Regards
Gaetano Mendola









Reply With Quote
  #3  
Old   
Tom Lane
 
Posts: n/a

Default Re: Comparing database schema's - 08-02-2004 , 08:15 PM



Frank Kurzawa <fkurzawa (AT) topazsoftware (DOT) com> writes:
Quote:
How are people doing automated comparisons of schemas in different databases?

I've experimented some with 'pg_dump -s' to do this: Do a schema dump
on the two databases and a diff. But due to myriad small differences
(order of creation of tables, constraints, etc.) it is very difficult
to get a usable diff without engaging in massive massage of the dump
output, including dumping a table at a time.
FWIW, some attention has been paid to this issue recently. I think CVS
tip pg_dump is more useful for this task than existing releases. Don't
suppose you'd want to try it out?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Reply With Quote
  #4  
Old   
Gaetano Mendola
 
Posts: n/a

Default Re: Comparing database schema's - 08-03-2004 , 06:47 AM



Tom Lane wrote:

Quote:
Frank Kurzawa <fkurzawa (AT) topazsoftware (DOT) com> writes:

How are people doing automated comparisons of schemas in different databases?


I've experimented some with 'pg_dump -s' to do this: Do a schema dump
on the two databases and a diff. But due to myriad small differences
(order of creation of tables, constraints, etc.) it is very difficult
to get a usable diff without engaging in massive massage of the dump
output, including dumping a table at a time.


FWIW, some attention has been paid to this issue recently. I think CVS
tip pg_dump is more useful for this task than existing releases. Don't
suppose you'd want to try it out?
Yes, indeed now pg_dump when possible dump the objects in alfabetic order
so shall be easy to perform a diff between the two schemas.


Regards
Gaetano Mendola




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.