Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 8F7EE9F9A4E for ; Wed, 24 Oct 2007 02:27:30 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 74842-03 for ; Wed, 24 Oct 2007 02:27:18 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from smaug.vex.net (smaug.vex.net [208.76.104.132]) by postgresql.org (Postfix) with ESMTP id DDC059F9EDB for ; Wed, 24 Oct 2007 02:27:24 -0300 (ADT) Received: from dilbert (unknown [207.35.13.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smaug.vex.net (Postfix) with ESMTP id 928D117150; Wed, 24 Oct 2007 01:27:22 -0400 (EDT) Date: Wed, 24 Oct 2007 01:27:05 -0400 From: "D'Arcy J.M. Cain" To: Paul Lambert Cc: Tom Lane , pgsql-sql Subject: Re: Quick question re foreign keys. Message-Id: <20071024012705.5f253946.darcy@druid.net> In-Reply-To: <471EB55F.5050600@autoledgers.com.au> References: <471EA7D5.9040403@autoledgers.com.au> <21715.1193193880@sss.pgh.pa.us> <471EB55F.5050600@autoledgers.com.au> X-Mailer: Sylpheed 2.4.5 (GTK+ 2.12.0; i386--netbsdelf) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200710/98 X-Sequence-Number: 29470 On Wed, 24 Oct 2007 11:00:47 +0800 Paul Lambert wrote: > It's marked not null as a result of being part of the primary key for > that table which I can't really get around. > > I can get away with not having the foreign key though, so I'll have to > go down that path. It can't be the primary key and have NULLs. It sounds to me like you have a design problem somewhere. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/ | and a sheep voting on +1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.