Re: Lazy constraints / defaults
От | Martijn van Oosterhout |
---|---|
Тема | Re: Lazy constraints / defaults |
Дата | |
Msg-id | 20080310075237.GB12727@svana.org обсуждение исходный текст |
Ответ на | Re: Lazy constraints / defaults ("Dawid Kuroczko" <qnex42@gmail.com>) |
Ответы |
Re: Lazy constraints / defaults
|
Список | pgsql-hackers |
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 <kleptog@svana.org> http://svana.org/kleptog/ > Please line up in a tree and maintain the heap invariant while > boarding. Thank you for flying nlogn airlines.
В списке pgsql-hackers по дате отправления: