Re: Function tracking

From: Glyn Astill <glynastill(at)yahoo(dot)co(dot)uk>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Rebecca Clarke <r(dot)clarke83(at)gmail(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Function tracking
Date: 2013-06-07 16:54:19
Message-ID: 1370624059.13939.YahooMailNeo@web133203.mail.ir2.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
> To: Rebecca Clarke <r(dot)clarke83(at)gmail(dot)com>
> Cc: pgsql-general(at)postgresql(dot)org
> Sent: Friday, 7 June 2013, 11:44
> Subject: Re: [GENERAL] Function tracking
>
> Hello
>
> 2013/6/7 Rebecca Clarke <r(dot)clarke83(at)gmail(dot)com>:
>> Hi all
>>
>> I'm looking for suggestions on the best way to track the updates to a
>> function.
>>
>> We have two databases, Dev & Live, so I want to update Live with just
> the
>> functions that have been modified in the DEV databas3e.
>> Is there another, easier way to track the updates than manually recording
> it
>> in a document? (I'm trying to eliminate human interference).
>>
>
> There is a few tools
>
> http://stackoverflow.com/questions/4804779/how-to-check-difference-between-two-databases-in-postgressql
> http://pgdiff.sourceforge.net/
>
> But I prefer editing files for storing schema and function
> definitions. And I use a git. I dislike direct object modifying via
> tools like pgAdmin and similar.
>

I agree, things can get a bit chaotic with everyone using pgAdmin. We do similiar with a set of script files in source control. In addition some sort of automated deployment process helps.

My soloution is probably overkill, but we have to deploy over a number of slony nodes in a big two phase commit.  I have a controlled deployment process that checks the changes against a small list of things I don't want the devs doing, checks for any errors by testing against a special clone, and then records the actual effects of the changes in the scripts (i.e. drop cascaded etc) before anything is actually deployed.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jorge Arévalo 2013-06-07 18:18:22 Re: What's a good way to improve this query?
Previous Message Glyn Astill 2013-06-07 16:51:31 Re: Function tracking