From: Johannes Grødem <johs@copyleft.no>
To: pgsql-sql@postgresql.org
Subject: Re: Foreign key referencing subclasses.
Date: Fri, 23 Mar 2001 14:50:43 +0100
Message-ID: <20010323145043.A4814@unity.copyleft.no> (raw)
In-Reply-To: <01032218164700.00782@pinguin>
References: <20010322151847.A26189@unity.copyleft.no>
<01032218164700.00782@pinguin>
>> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: johs@copyleft.no
Subject: Re: Foreign key referencing subclasses.
In-Reply-To: <20010323145043.A4814@unity.copyleft.no>
References: <20010322151847.A26189@unity.copyleft.no> <01032218164700.00782@pinguin> <20010323145043.A4814@unity.copyleft.no>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox