Re: source control integration

From: Greg Stark <gsstark(at)mit(dot)edu>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: source control integration
Date: 2004-12-06 04:21:13
Message-ID: 87d5xo2h1i.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Simon Wittber <simonwittber(at)gmail(dot)com> writes:

> What is currently regarded as postgresql best-practice for controlling
> changes to a database?
>
> I currently administer SQL Server. I implemented a system which
> scripts every database object each hour (into a SQL script on the
> filesystem), and then uses SVN to track changes and email me if a
> change has occured, which then gives me the opportunity to review and
> commit the change.
>
> Is this sort of thing possible with postgresql?

Look at pg_dump -s. I do something similar though I only pull the data on
demand and check it in manually with a commit message.

With 7.4 you get spurious changes that you have to strip out. My makefile
entry for 7.4 is:

schema.sql:
pg_dump -U postgres -s db | sed '/^-- TOC entry/d;/^\\connect - postgres/,/^\\connect - db/d;/^SET search_path/d;/^$$/d;/^--$$/d' > $@

I think the 8.0 pg_dump has removed the extraneous information.

--
greg

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2004-12-06 04:31:34 Re: When to encrypt
Previous Message Guy Rouillier 2004-12-06 02:21:16 Re: Select distinct sorting all rows 8.0rc1