From: | teknokrat <teknokrat(at)yahoo(dot)com> |
---|---|
To: | pgadmin-support(at)postgresql(dot)org |
Subject: | Re: Cannot add non-null columns |
Date: | 2004-10-05 14:39:18 |
Message-ID: | cjubmh$s7k$1@news.hub.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-support |
Miha Radej wrote:
> hi!
>
> afaik you cannot add a not null column to a table because (in a table
> where there is already some data) the field values are null. the option
> to add a not null column perhaps only works on an empty table with no
> rows yet. so this behaviour is expected.
> therefore you need to add a column, update the table to set the column
> values so there is no null fields and then you can alter the column to
> set it a default value, then again to set it no null. this always worked
> for me.
>
Sorry, I wasn't clear. This is an empty table. After creating it, I
wanted to add some more columns. I used the properties of the table to
try adding them but this failed. I then went to the column view and
added them one at a time and that worked. This behaviour is inconsistent
and should be fixed. There was no data in the table when I did this.
From | Date | Subject | |
---|---|---|---|
Next Message | Luis Antonio Martinez Cuevas | 2004-10-05 15:52:10 | postgres help |
Previous Message | Dave Page | 2004-10-05 14:10:29 | Re: Multiple selections delete bug |