X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 558349DC999 for ; Tue, 28 Feb 2006 11:53:14 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 53129-09 for ; Tue, 28 Feb 2006 11:53:19 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from pjetlic.mobart.hr (pjetlic.mobart.hr [80.80.51.10]) by postgresql.org (Postfix) with ESMTP id 3DEAD9DC823 for ; Tue, 28 Feb 2006 11:53:11 -0400 (AST) Received: from localhost (localhost.localdomain [127.0.0.1]) by pjetlic.mobart.hr (Postfix) with ESMTP id 2C38E17A8C for ; Tue, 28 Feb 2006 16:53:15 +0100 (CET) Received: from pjetlic.mobart.hr ([127.0.0.1]) by localhost (pjetlic [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 28668-02 for ; Tue, 28 Feb 2006 16:53:15 +0100 (CET) Received: from mike.mobart.hr (mike.mobart.hr [192.168.10.94]) (using SSLv3 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by pjetlic.mobart.hr (Postfix) with ESMTP id 0AC5C17A7F for ; Tue, 28 Feb 2006 16:53:15 +0100 (CET) Subject: pg_diff, or something like it...? From: Mario Splivalo Reply-To: mario.splivalo@mobart.hr To: pg-admin postgre Content-Type: text/plain Organization: Mob-Art Date: Tue, 28 Feb 2006 16:53:00 +0100 Message-Id: <1141141981.22016.22.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by OpenSource AV+AS Mail Server X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.138 required=5 tests=[AWL=0.138] X-Spam-Score: 0.138 X-Spam-Level: X-Archive-Number: 200602/328 X-Sequence-Number: 20749 I've found pg_diff, a ruby script, wich does the job - not quite. The issue is like this: I have a database on few production servers, some 40 tables with 60 views, 120 types and 250 functions. The functions are used for internal application bussines logic, as for the interface to the application front-end engine. Now, when 'upgrading' an application we often change some of the tables, views, types or functions. pg_diff script can help in tracking the differences between the current production version of the database shema, and the new, 'upgraded' version of database shema. The nightmare begins when actually trying to upgrade the schema. For instance, changing a view definition (changed the number of columns) requires me to drop that view, and all other dependant views and/or functions. Now I'm doing it by hand, and I'm asking is there a tool wich could help me track the differences? The ultimate goal would be to have a .deb package for our application, so upgrading the application would be easy as 'apt-get upgrade'. The .deb package installation would stop the application, apply the .diff.sql file (first drop the objects, then recreate them), and then restart the application. But, for now, just a 'dependency tracker' of some sort would be a huge help. Mario -- Mario Splivalo Mob-Art mario.splivalo@mobart.hr "I can do it quick, I can do it cheap, I can do it well. Pick any two."