Re: Updating database structure - Mailing list pgsql-general

From Alban Hertroys
Subject Re: Updating database structure
Date
Msg-id 4422800A.6080203@magproductions.nl
Whole thread Raw
In response to Re: Updating database structure  (Guido Neitzer <guido.neitzer@pharmaline.de>)
Responses Re: Updating database structure  (Miroslav Šulc <miroslav.sulc@startnet.cz>)
List pgsql-general
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,

--
Alban Hertroys
alban@magproductions.nl

magproductions b.v.

T: ++31(0)534346874
F: ++31(0)534346876
M:
I: www.magproductions.nl
A: Postbus 416
    7500 AK Enschede

// Integrate Your World //

pgsql-general by date:

Previous
From: Bernhard Weisshuhn
Date:
Subject: Re: Some pgbench results
Next
From: Bjørn T Johansen
Date:
Subject: Logging of sql statements?