Re: How to do an UPDATE for all the fields that do NOT break a constraint?

Поиск
Список
Период
Сортировка
От Alban Hertroys
Тема Re: How to do an UPDATE for all the fields that do NOT break a constraint?
Дата
Msg-id A3127A57-B559-4276-982B-A697012E04DA@solfertje.student.utwente.nl
обсуждение исходный текст
Ответ на How to do an UPDATE for all the fields that do NOT break a constraint?  (Phoenix Kiula <phoenix.kiula@gmail.com>)
Список pgsql-general
On Jan 26, 2009, at 2:09 PM, Phoenix Kiula wrote:

> I wonder if this is an SQL limitation or something I'm missing in the
> PG manual, but I need to run an update on my database (to replace the
> value of a column to match a new design structure).


Easiest is probably to add a new column for the new values and add a
constraint to that, deprecating (or even dropping) the old column from
your design. Don't forget to vacuum afterwards.

Alban Hertroys

--
If you can't see the forest for the trees,
cut the trees and you'll see there is no forest.


!DSPAM:737,497f5540747032091416566!



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

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Re: Slow first query despite LIMIT and OFFSET clause
Следующее
От: Sam Mason
Дата:
Сообщение: Re: performance advice needed: join vs explicit subselect