Quickly making a column non-nullable (without a table scan)

Поиск
Список
Период
Сортировка
От Joe Van Dyk
Тема Quickly making a column non-nullable (without a table scan)
Дата
Msg-id CACfv+pJc2F-QTV7xiCJ7+Pdmvc3WFTEakm_TONY6o82M3H4GVQ@mail.gmail.com
обсуждение исходный текст
Список pgsql-general
Hi,

I have an index on a column that can be nullable. I decide the column
shouldn't be nullable anymore. So I alter the column to be not
nullable.

That "alter column" query does a full table scan, which can be painful
for large tables.  Couldn't that index be used instead?

Thanks,
Joe


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

Предыдущее
От: Emi Lu
Дата:
Сообщение: Re: JDBC to load UTF8@psql to latin1@mysql
Следующее
От: Tom Lane
Дата:
Сообщение: Re: initdb error