Simon Wittber <[EMAIL PROTECTED]> 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


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

               http://archives.postgresql.org

Reply via email to