Re: Cannot add non-null columns
| От | teknokrat |
|---|---|
| Тема | Re: Cannot add non-null columns |
| Дата | |
| Msg-id | cjubmh$s7k$1@news.hub.org обсуждение |
| Ответ на | Re: Cannot add non-null columns (Miha Radej <miha.radej@siix.com>) |
| Ответы |
Re: Cannot add non-null columns
|
| Список | 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.
В списке pgadmin-support по дате отправления: