Re: Set NOT NULL error
От | Andreas Kretschmer |
---|---|
Тема | Re: Set NOT NULL error |
Дата | |
Msg-id | 20111121075949.GA6133@tux обсуждение исходный текст |
Ответ на | Set NOT NULL error (Michael Rowan <mike.rowan@internode.on.net>) |
Список | pgsql-novice |
Michael Rowan <mike.rowan@internode.on.net> wrote: > This command run from the SQL window of pgAdmin3 results in an error: > > In the table vehicle there is a column maker_id > There is no data in the table, it is newly created. > > ALTER TABLE vehicle ADD CONSTRAINT maker_id SET NOT NULL; > > ERROR: syntax error at or near "SET" wrong syntax, use instead: test=# create table foo1(id int); CREATE TABLE Time: 0,623 ms test=*# alter table foo1 alter column id set not null; ALTER TABLE Time: 0,334 ms Regards Andreas -- Really, I'm not out to destroy Microsoft. That will just be a completely unintentional side effect. (Linus Torvalds) "If I was god, I would recompile penguin with --enable-fly." (unknown) Kaufbach, Saxony, Germany, Europe. N 51.05082°, E 13.56889°
В списке pgsql-novice по дате отправления: