Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 317FF475F25 for ; Thu, 12 Dec 2002 04:02:45 -0500 (EST) Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id B85A3475DC0 for ; Thu, 12 Dec 2002 04:02:44 -0500 (EST) Received: by news.hub.org (Postfix, from userid 8) id 9E46C43A587; Thu, 12 Dec 2002 04:02:44 -0500 (EST) From: Huub X-Newsgroups: comp.databases.postgresql.sql Subject: Re: primary + foreign key Date: Thu, 12 Dec 2002 10:02:28 +0100 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 26 Message-ID: References: <3DF84EC1.2020506@klaster.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en In-Reply-To: <3DF84EC1.2020506@klaster.net> To: pgsql-sql@postgresql.org X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/149 X-Sequence-Number: 10737 Hi, I suppose 'detail' is the table name? And what is master? Thanks Huub > create table detail > ( > id1 integer, > id2 integer, > CONSTRAINT c1 PRIMARY KEY(id1,id2), > CONSTRAINT c2 FOREIGN KEY(id1,id2) REFERENCES master > ); > > Do you really need such detail table? You can just add columns to master > table. > > Tomasz Myrta > > > ---------------------------(end of broadcast)--------------------------- > TIP 5: Have you checked our extensive FAQ? > > http://www.postgresql.org/users-lounge/docs/faq.html