From: | Greg Stark <gsstark(at)mit(dot)edu> |
---|---|
To: | Hannu Krosing <hannu(at)skype(dot)net> |
Cc: | Greg Stark <gsstark(at)mit(dot)edu>, Martijn van Oosterhout <kleptog(at)svana(dot)org>, Simon Riggs <simon(at)2ndquadrant(dot)com>, "Jim C(dot) Nasby" <jnasby(at)pervasive(dot)com>, pgsql-hackers(at)postgresql(dot)org, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Subject: | Re: effective SELECT from child tables |
Date: | 2005-10-04 03:22:31 |
Message-ID: | 87oe667yq0.fsf@stark.xeocode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hannu Krosing <hannu(at)skype(dot)net> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Greg Stark | 2005-10-04 03:24:30 | Re: effective SELECT from child tables |
Previous Message | Tom Lane | 2005-10-04 02:50:49 | Re: Build Farm: thrush |