Re: Is there any technical reason why "alter table .. set not null" can't use index?

Поиск
Список
Период
Сортировка
От hubert depesz lubaczewski
Тема Re: Is there any technical reason why "alter table .. set not null" can't use index?
Дата
Msg-id 20210910175552.GA7127@depesz.com
обсуждение исходный текст
Ответ на Re: Is there any technical reason why "alter table .. set not null" can't use index?  (Gus Spier <gus.spier@gmail.com>)
Список pgsql-general
On Fri, Sep 10, 2021 at 01:26:46PM -0400, Gus Spier wrote:
> Would it help to create a new not null column in the target table, and
> then update the table by copying values from old column to the new,
> not null column? Of course you’d have to ignore errors, etc. but
> wouldn’t that perform at enough for your needs?

Why would you think that adding new column, with constraint, and copying
data would be faster?

depesz



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

Предыдущее
От: Gus Spier
Дата:
Сообщение: Re: Is there any technical reason why "alter table .. set not null" can't use index?
Следующее
От: Keith Christian
Дата:
Сообщение: PostgreSQL starting with a corrupted database or other fatal issues