constraint with no check - Mailing list pgsql-hackers

From Michał Zaborowski
Subject constraint with no check
Date
Msg-id e2289d9e0803081256y19edd3b7g879db0317555452c@mail.gmail.com
Whole thread Raw
List pgsql-hackers
Hello, I would like to be able to add CONSTRAINT, 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?
 Also IMVHO it is good idea to release the exclusive lock just after
meta-data change. So, it would be nice to be able to release lock at
any time.
 That  jobs can be done in other ways, but new users can get in
troubles. Also explicit lock release can help with bulk updates. You
see - maybe it is not a "problem" - but doing all that some how silly
job - day by day... is boring.
 Hope it can help.

--
Regards, Michał Zaborowski (TeXXaS)

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Google Summer of Code 2008
Next
From: Dave Cramer
Date:
Subject: Re: Doubt in index scan code