Received: from unity.copyleft.no (unity.copyleft.no [212.71.72.23]) by mail.postgresql.org (8.11.3/8.11.1) with ESMTP id f2NDomw53125 for ; Fri, 23 Mar 2001 08:50:48 -0500 (EST) (envelope-from johs@unity.copyleft.no) Received: from johs by unity.copyleft.no with local (Exim 3.12 #1) id 14gRxj-0001Ly-00 for pgsql-sql@postgresql.org; Fri, 23 Mar 2001 14:50:43 +0100 Date: Fri, 23 Mar 2001 14:50:43 +0100 From: =?iso-8859-1?Q?Johannes_Gr=F8dem?= To: pgsql-sql@postgresql.org Subject: Re: Foreign key referencing subclasses. Message-ID: <20010323145043.A4814@unity.copyleft.no> References: <20010322151847.A26189@unity.copyleft.no> <01032218164700.00782@pinguin> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <01032218164700.00782@pinguin>; from gcg@gl.aser.de on Thu, Mar 22, 2001 at 06:16:47PM +0100 Organization: Copyleft Software AS X-Archive-Number: 200103/460 X-Sequence-Number: 2128 >> CREATE TABLE resource_record( >> rrid SERIAL >> -- etc. >> ); > There is no primary key for this table. Just write PRIMARY KEY after > SERIAL. There is. I accidentally left it out in the post. > CREATE INDEX soa_record_pkey ON soa_record ( rrid ); > You could also state the referenced field name (you actually have to, > if you happen to reference to a non-primary key field): Ok, thanks. This will work for this case, but I still want to be able to reference resource_record*. Will this be possible in later versions? Inheritance isn't quite as useful if I can't. Sorry to be such a whiner, by the way. PostgreSQL is great. -- johs