Hannu Krosing <[EMAIL PROTECTED]> writes: > Probably a different syntax would be better here, perhaps > > ALTER TABLE ADD foo integer AS 1 WHEN MISSING; > > or somesuch.
Uhm, if you're adding the column they're *all* "missing". That's the whole point. If you start inventing a new user-visible concept "missing" and try to distinguish it from NULL you're going to have a hell of a time defining the semantics. The goal has to be to provide the *exact* same user-visible semantics as actually setting the default. That means setting all the existing rows if you're adding a new column. It also unfortunately means tackling the much trickier gotcha that Tom raised about what happens if you want to later change the default. -- greg ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings