From: | Erik Jones <ejones(at)engineyard(dot)com> |
---|---|
To: | Grzegorz Jaśkiewicz <gryzman(at)gmail(dot)com> |
Cc: | "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: lack of consequence with domains and types |
Date: | 2008-12-24 17:12:27 |
Message-ID: | E83E368B-6C93-4494-9653-AB8AD329443B@engineyard.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Dec 22, 2008, at 1:08 PM, Grzegorz Jaśkiewicz wrote:
> On Mon, Dec 22, 2008 at 6:10 PM, Erik Jones <ejones(at)engineyard(dot)com>
> wrote:
>> As mentioned above, by "fixing" the behavior to be what you're
>> expecting
>> you'd be breaking the defined behavior of ALTER TABLE.
>
> I don't understand. The domain's have default values, how will it
> break alter table ? Please explain.
Yes, and columns have default values, too, which are not tied to their
datatype's default value (if it even has one). ALTER TABLE
initializes rows to have the new *column's* default. A column of some
domain type could easily have some default other than the domain's
default and, in fact, if you don't specify a default for the column
then it's default is NULL.
Erik Jones, Database Administrator
Engine Yard
Support, Scalability, Reliability
866.518.9273 x 260
Location: US/Pacific
IRC: mage2k
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2008-12-24 17:14:50 | Re: Compiling 8.4devel on OpenSolaris2008.11 with SunStudioExpress |
Previous Message | Scott Marlowe | 2008-12-24 16:54:59 | Re: need some help with pl-pgsql |