Re: I think this is a BUG?

Поиск
Список
Период
Сортировка
От Alban Hertroys
Тема Re: I think this is a BUG?
Дата
Msg-id 35895291-2ED7-459D-98D6-021203D9CB21@solfertje.student.utwente.nl
обсуждение исходный текст
Ответ на I think this is a BUG?  (Kaloyan Iliev <kaloyan@digsys.bg>)
Список pgsql-general
On Apr 24, 2008, at 10:11 AM, Kaloyan Iliev wrote:
> regbgrgr=# ALTER TABLE test ADD COLUMN not_null INT NOT NULL ;
> ERROR:  column "id" contains null values
>
> ==========================================EXAMPLE2====================
> ==================
> Example2:
> In this case the postgress fill the NOT NULL column ID from the
> sequence.

What sequence? You never told it you wanted one. A PRIMARY KEY
doesn't automatically add a sequence nor does a NOT NULL constraint,
the serial type does that but you defined the column as type int, not
as type serial.

Alban Hertroys

--
If you can't see the forest for the trees,
cut the trees and you'll see there is no forest.


!DSPAM:737,4810d219927662597012045!



В списке pgsql-general по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: Adding notes against fields
Следующее
От: Tino Wildenhain
Дата:
Сообщение: Re: How to modify ENUM datatypes?