Thread: ALTER TABLE ADD COLUMN syntax question.

ALTER TABLE ADD COLUMN syntax question.

From
"Robert B. Easter"
Date:
I used the command below to alter a table and it took with no problem, but the
REFERENCES appears to have been ignored since I can put invalid numbers into
last_post_id.  Are there plans to add the ability to specify column
constrainsts with ALTER TABLE ADD COLUMN in the future?  For now, I suppose I
can use ALTER TABLE ADD CONSTRAINT to make a table constraint for last_post_id.I hope it will not make things too slow.
Are table constraints slower than
 
column constraints? 

ALTER TABLE topic ADD COLUMN last_post_id INTEGER REFERENCES post ON DELETE
SET NULL;
--         Robert