From: | Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> |
---|---|
To: | Russ Brown <pickscrape(at)gmail(dot)com> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: PGSQL or other DB? |
Date: | 2009-02-01 16:44:41 |
Message-ID: | dcc563d10902010844l78696bd5h703e6356bfafb9f3@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Sun, Feb 1, 2009 at 7:33 AM, Russ Brown <pickscrape(at)gmail(dot)com> wrote:
> Scott Marlowe wrote:
>>
>> On Sat, Jan 31, 2009 at 2:13 AM, Erik Jones <ejones(at)engineyard(dot)com> wrote:
>>>
>>> On Jan 30, 2009, at 11:37 AM, durumdara wrote:
>>> Looking into Firebird I couldn't
>>> find how it handles (or doesn't) that at all I but I did see that it will
>>> happily let you add a new not null column with no default to a table by
>>> writing nulls for the new attribute for any existing columns. That
>>> already
>>> makes me queasy.
>>
>> That's pretty much what pgsql does. Why does it make you queasy?
>>
>
> I think the key is that the new column is NOT NULL, so defaulting the new
> column's values to NULL results in immediate data integrity inconsistency.
>
> If I remember rightly, PG doesn't allow this: you have to create the column
> as NULL, UPDATE and then add the NOT NULL constraint, or perhaps (I haven't
> tried this) create the column with a default and then remove it immediately
> afterwards.
OK, I completely misunderstood what the other poster meant. Pgsql
does NOT allow creating the not null column with nulls in place. That
would make me quesy too. Creating it with a default works in
postgresql.
From | Date | Subject | |
---|---|---|---|
Next Message | Mohamed | 2009-02-01 17:00:02 | Re: Indices types, what to use. Btree, Hash, Gin or Gist |
Previous Message | Alex | 2009-02-01 16:32:58 | Re: Full text index not being used |