hello, i can't be able to add a constraint to a table. example: alter table mytable add primary key (id); -- i get the error: Existing attribute "id" cannot be a PRIMARY KEY because -- it is not marked NOT NULL -- -- but at this point i cannot be able to add the constraint not null to the -- column id. -- -- i tried: alter table mytable alter column id set not null; -- ERROR: parser: parse error at or near "not" alter table mytable set not null (id); -- ERROR: parser: parse error at or near "set" alter table mytable add not null (id); -- ERROR: parser: parse error at or near "not" ---------------------------------------- note that i must alter an existing table, or copying and modifying an existing table. postgresql 7.2.3 - debian package. postgresql 7.2.2 - debian package. any idea? -- BOFH excuse #321: Scheduled global CPU outage
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера