Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 98A669FB3F2 for ; Wed, 1 Aug 2007 13:14:12 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 01388-01 for ; Wed, 1 Aug 2007 13:14:08 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from smaug.vex.net (smaug.vex.net [208.76.104.132]) by postgresql.org (Postfix) with ESMTP id 2F98D9FA4CA for ; Wed, 1 Aug 2007 13:14:08 -0300 (ADT) Received: from dilbert (host-208-65-241-192.static.295.ca [208.65.241.192]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smaug.vex.net (Postfix) with ESMTP id 937AA1798C; Wed, 1 Aug 2007 12:14:05 -0400 (EDT) Date: Wed, 1 Aug 2007 12:14:03 -0400 From: "D'Arcy J.M. Cain" To: "John Mitchell" Cc: pgsql-sql@postgresql.org Subject: Re: How do I connect postgres table structures and view structures to an existing svn repository? Message-Id: <20070801121403.888ae76b.darcy@druid.net> In-Reply-To: References: <20070801113812.6a2d6fac.darcy@druid.net> X-Mailer: Sylpheed 2.4.3 (GTK+ 2.10.13; i386--netbsdelf) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.004 tagged_above=0 required=5 tests=AWL=0.003, BAYES_50=0.001 X-Spam-Level: X-Archive-Number: 200708/4 X-Sequence-Number: 28942 On Wed, 1 Aug 2007 11:45:21 -0400 "John Mitchell" wrote: > I am trying to store schema definitions in version-control which I can do by > saving the definition and then importing into svn, but I would like it > to be automatic , so that when an update occurs to a table or view within > postgres then that table or view is flagged within svn. This would be > similar to what I currently do with source code that I have for a web app > within eclipse. Not really an SQL question, in fact it is barely a PostgreSQL question at all but I will try to give a pointer. I don't know of any automated tools. I would suggest running a cron script that dumps the database and then does an svn commit. If there are no changes then the commit will do nothing. If there are changes then svn will be updated. Don't forget to pipe a log message into svn (-F or --file option) and you may need to check for irrelevant changes in the dump before calling svn. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/ | and a sheep voting on +1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.