Re: best practice in upgrading db structure

Поиск
Список
Период
Сортировка
От SunWuKung
Тема Re: best practice in upgrading db structure
Дата
Msg-id MPG.1e93d5f3e6715d3e989695@news.postgresql.org
обсуждение исходный текст
Ответ на best practice in upgrading db structure  (SunWuKung <Balazs.Klein@axelero.hu>)
Ответы Re: best practice in upgrading db structure  ("Jim C. Nasby" <jnasby@pervasive.com>)
Re: best practice in upgrading db structure  (Scott Marlowe <smarlowe@g2switchworks.com>)
Список pgsql-general
In article <20060328221109.GC75181@pervasive.com>, jnasby@pervasive.com
says...
> On Tue, Mar 28, 2006 at 09:28:12PM +0200, SunWuKung wrote:
> > This is going to be an amateur question...
> >
> > Could somebody explain me, or point me to a resource where I can find
> > out what is the recommended practice when a live db needs to be replaced
> > with a new version of it that has a slightly different structure?
> >
> > My first guess would be to create the empty new version of the db and
> > insert the data of the old one into it - adding and modifying it when
> > necessary, but I am not sure.
> >
> > What do you usually do in a situation like this?
>
> ALTER TABLE ...
>

I know this is easy to do when the db is empty, but do you still suggest
this when there is data in the db : changing the structure of the old
version of the db to match the new one (obviously not on the live
server) and than try to modify the data in it to fit the structure eg.
there are two new columns that needs data?



В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Auto convert for type?
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: best practice in upgrading db structure