Re: Updating database structure - Mailing list pgsql-general

From Miroslav Šulc
Subject Re: Updating database structure
Date
Msg-id 4422CE08.8030203@startnet.cz
Whole thread Raw
In response to Re: Updating database structure  (Alban Hertroys <alban@magproductions.nl>)
List pgsql-general
Hello,

I accidentaly came across this post. I didn't follow it so I don't know whether my posting is to the topic or not. I've
justuploaded project at SourceForge.Net on topic of PostgreSQL database schema upgrades because I needed to find out
differencesbetween current and new schemas. The project is called apgdiff (Another PostgreSQL Diff Tool) and can be
foundat apgdiff.sourceforge.net. It is still in beta but might be useful. 

Sorry if this post is not to the topic.

Miroslav Šulc



Alban Hertroys napsal(a):
> Guido Neitzer wrote:
>> I mostly use the command line tools or a graphical tool to make my
>> own sql calls for every schema change I make on the development
>> database.
>>
>> Then all these changes come to a "script" in my application (it's
>> not  actually a script but similar). The database has a version tag
>> in one  table. The application has a bunch of these "scripts" to
>> convert from  one version to another.  It knows the sequence in how
>> they have to be  applied by looking at the version numbers.
>
> Looks like it could be useful to make the database 'log' the DDL
> statements and having the ability to export those to a script starting
> from a certain version.
>
> It would probably still need user intervention, as sometimes
> experiments and mistakes require fixing things - which would result in
> bogus or non-optimal DDL statements in the log.
>
> There's also sometimes the need to update data between statements, for
> example when adding a new NOT NULL column to a table. Not sure what to
> do in that case. Automating that would require some server side
> 'intelligence'...
>
> Regards,
>

Attachment

pgsql-general by date:

Previous
From: Andreas Kretschmer
Date:
Subject: Re: Logging of sql statements?
Next
From: "Jim C. Nasby"
Date:
Subject: SELECT beer FROM pub WHERE location = 'Europe'