By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,852 Members | 2,200 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,852 IT Pros & Developers. It's quick & easy.

DDL diff utility?

P: n/a
My company offers an ASP service for advertising companies using PG.
For contractual reasons, each client gets its own replicated database.
This presents a problem whenever a new feature/fix requires a DDL change
which must be rolled out across N databases. Currently, we keep track of
these changes via a central text file in CVS with manually entered DDL
updates. The problem is making sure that overworked developers actually
log all these changes.

What would be better is a DDL 'diff' utility that would look at a master
and target database and generate the necessary ALTER statements needed
to make the target db look like the master.

Is anyone aware of such a tool for PG? I've only found it for MSSQL.

---------------------------------------------=o&o>---------
Steve Manes http://www.magpie.com
Brooklyn, NY


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 11 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a


Steve Manes <sm****@magpie.com> writes:

....
The problem is making sure that overworked developers actually log all these
changes.

What would be better is a DDL 'diff' utility that would look at a master and
target database and generate the necessary ALTER statements needed to make the
target db look like the master.


You might want to look for a perl tool called "Alzabo" I don't know which
databases it supports though.

I've found it useful to do regularly run a command like:
pg_dump -s | grep -v '^-- TOC entry' > $@

and save the result in CVS. Then I can use cvs diff to view the changes in the
schema from one checkin to another. However this just shows what the net
differences are, not what the ALTER command would be to reproduce the change.

--
greg
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 11 '05 #2

P: n/a
On Fri, 2003-09-19 at 07:42, Steve Manes wrote:
My company offers an ASP service for advertising companies using PG.
For contractual reasons, each client gets its own replicated database.
This presents a problem whenever a new feature/fix requires a DDL change
which must be rolled out across N databases. Currently, we keep track of
these changes via a central text file in CVS with manually entered DDL
updates. The problem is making sure that overworked developers actually
log all these changes.

What would be better is a DDL 'diff' utility that would look at a master
and target database and generate the necessary ALTER statements needed
to make the target db look like the master.

Is anyone aware of such a tool for PG? I've only found it for MSSQL.


Check the mailing list archives, IIRC there is a project on sourceforge
that does this. It's a little weird though, I think it was written in
tcl and required a running webserver to make connections. HTH,

Robert Treat
--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 11 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.