Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id B6DAB475A68 for ; Mon, 22 Jul 2002 11:40:46 -0400 (EDT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id 83797D600; Mon, 22 Jul 2002 08:40:48 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id 791CA5C03; Mon, 22 Jul 2002 08:40:48 -0700 (PDT) Date: Mon, 22 Jul 2002 08:40:48 -0700 (PDT) From: Stephan Szabo To: Michael Paesold Cc: Subject: Re: [NOVICE] SET CONSTRAINTS question... In-Reply-To: <00de01c23194$28c25360$c9bab23e@beeblebrox> Message-ID: <20020722083835.D13666-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Archive-Number: 200207/331 X-Sequence-Number: 8709 > CREATE SEQUENCE conn_id_seq; > CREATE TABLE conn ( > id INTEGER NOT NULL DEFAULT nextval('conn_id_seq'), > name VARCHAR(40), > CONSTRAINT conn_friend_fkey FOREIGN KEY(name) > REFERENCES friend(name) > ON UPDATE CASCADE > ON DELETE RESTRICT I believe we interpreted restrict as being such that you can't defer it. No action specification for delete probably would do what you wanted. (We may also be wrong about restrict, but the above would be a workaround in any case)