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

From: "Kevin Grittner" <kgrittn(at)mail(dot)com>
To: "Joe Van Dyk" <joe(at)tanga(dot)com>,pgsql-general(at)postgresql(dot)org
Subject: Re: Quickly making a column non-nullable (without a table scan)
Date: 2012-12-14 20:56:21
Message-ID: 20121214205621.322410@gmx.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Joe Van Dyk wrote:

> 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?

Interesting idea, but I'm pretty sure we don't yet have such logic.

-Kevin

Browse pgsql-general by date

  From Date Subject
Next Message James B. Byrne 2012-12-14 21:33:16 Problems with a custom LOCALE
Previous Message Edson Richter 2012-12-14 20:28:23 Re: PgSQL 9.1: Warning - error 10061 on Windows, no error on Linux - but connection is broken