Re:A Year with MongoDB
by jeffdavis on Saturday April 14, 2012 @03:09PM
(#3841706)
If you choose to update all of the old records.
As other posts have already mentioned, adding a new column to a table in postgres does so instantly unless you set a default (telling postgres that you want it to update all the old records too).
If you add the default separately from adding the column, you get the default but don't rewrite all the old rows (which remain NULL).
As other posts have already mentioned, adding a new column to a table in postgres does so instantly unless you set a default (telling postgres that you want it to update all the old records too).
If you add the default separately from adding the column, you get the default but don't rewrite all the old rows (which remain NULL).