Received: from comptechnews.com (root@cc993546-b.srst1.fl.home.com [24.3.77.52]) by hub.org (8.10.1/8.10.1) with ESMTP id e663slS80068 for ; Wed, 5 Jul 2000 23:54:47 -0400 (EDT) Received: from comptechnews (reaster@localhost [127.0.0.1]) by comptechnews.com (8.9.3/8.9.3) with SMTP id XAA26547 for ; Wed, 5 Jul 2000 23:56:37 -0400 From: "Robert B. Easter" To: pgsql-sql@postgresql.org Subject: ALTER TABLE ADD COLUMN syntax question. Date: Wed, 5 Jul 2000 23:51:04 -0400 X-Mailer: KMail [version 1.0.28] Content-Type: text/plain MIME-Version: 1.0 Message-Id: <00070523563709.01354@comptechnews> Content-Transfer-Encoding: 8bit X-Archive-Number: 200007/53 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