On Sun, Mar 09, 2008 at 10:45:59PM +0100, Dawid Kuroczko wrote:
> >  alter table tab add column col integer not null default 42 check (col > 0);
> 
> I think this will not solve the OP's problem.  He wants to minimize the time
> a table is under exclusive lock, and this ALTER command will effectively
> rewrite the whole table (to add new not null column).

ISTM a while back someone adding a patch that made the above almost
instantaneous. Probably remembering wrong though.

Have a nice day,
-- 
Martijn van Oosterhout   <[EMAIL PROTECTED]>   http://svana.org/kleptog/
> Please line up in a tree and maintain the heap invariant while 
> boarding. Thank you for flying nlogn airlines.

Attachment: signature.asc
Description: Digital signature

Reply via email to