Lazy constraints / defaults - Mailing list pgsql-hackers

From Michał Zaborowski
Subject Lazy constraints / defaults
Date
Msg-id e2289d9e0803090716q3b78270ardc4cd7f1774639ad@mail.gmail.com
Whole thread Raw
Responses Re: Lazy constraints / defaults  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Hello,I would like to be able to add CONSTRAINT and/or DEFAULT with out
affecting old rows. Yes, it sounds strange, but... Let's say I have
big table, I want to add new column, with DEFAULT and NOT NULL.
Normally it means long exclusive lock. So - right now I'm adding plain
new column, then DEFAULT, then UPDATE on all rows in chunks, then NOT
NULL... Can it be little simpler?

--
Regards, Michał Zaborowski (TeXXaS)

pgsql-hackers by date:

Previous
From: Michael Meskes
Date:
Subject: Re: timestamp datatype cleanup
Next
From: Andrew Chernow
Date:
Subject: Re: timestamp datatype cleanup