Version control hooks (was Re: schema diffing tool?)

From: "Webb Sprague" <webb(dot)sprague(at)gmail(dot)com>
To: "Selena Deckelmann" <sdeckelmann(at)chrisking(dot)com>
Cc: "Postgresql PDX_Users" <pdxpug(at)postgresql(dot)org>
Subject: Version control hooks (was Re: schema diffing tool?)
Date: 2008-01-16 23:37:43
Message-ID: b11ea23c0801161537u317d9892x542c23794bfa96fa@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pdxpug

On a somewhat related note, has anyone set up commit hooks in a
versioning system to grab current definitions from a (prototype)
database? Something like

1. Run svn commit ...

2. ... a script called in "pre-commit" does a pg_dump of function and
table definitions and stores them in code tree ...

3. ... svn (or mercurial) finishes the commit, including the changes
done "on the fly" in the database.

Subversion docs are suspicious of modifying the code tree in the
middle of a version control transaction, and so am I... Anybody tried
anything like this and lived to tell the tale?

(I think this might be a hackish way to address the versioning of
data, as long as that data was formatted through sort clauses, say, in
order to make text diffing possible. But that is beyond my ken.)

Tx
W

On Jan 14, 2008 12:21 PM, Selena Deckelmann <sdeckelmann(at)chrisking(dot)com> wrote:
>
> On Jan 14, 2008, at 11:53 AM, jason kirtland wrote:
>
> > Selena Deckelmann wrote:
> >>
> >> Hrm... after I finish my backlog for ptop, I will hack something
> >> up in Perl.
> >
> > The Perl SQLFairy toolkit could be a good place to start. It has
> > cross-db reflection / parsing & the infrastructure for comparisons.
> >
> > Pretty cool tool, actually. I've used it quite a bit in the past
> > for things like programmatically updating trigger definitions in
> > sync with schema changes. Using it was a breeze.
>
> Doesn't hurt that the name is awesome. Thanks for the tip!
>
> -selena
>
> --
> Selena Deckelmann
> Information Systems Manager
> Chris King Precision Components
> Made in Portland, Oregon
> www.chrisking.com / 503.972.4050 x230
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>

Browse pdxpug by date

  From Date Subject
Next Message Roth, Gabrielle 2008-01-17 16:53:58 Re: Postgres User's Group (in Seattle?)
Previous Message Selena Deckelmann 2008-01-16 19:52:08 Re: Postgres User's Group (in Seattle?)