booktown=# ALTER TABLE books
booktown-# ADD CONSTRAINT legal_subjects
booktown-# FOREIGN KEY (subjectjd)
booktown-# REFERENCES subjects (id);
NOTICE: ALTER TABLE ... ADD CONSTRAINT will create implicit trigger(s) for
FOREIGN KEY check(s)
CREATE