Re: Foreign key referencing subclasses.

From: Johannes Grødem <johs(at)copyleft(dot)no>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: Foreign key referencing subclasses.
Date: 2001-03-23 13:50:43
Message-ID: 20010323145043.A4814@unity.copyleft.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

>> 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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message postgresql 2001-03-23 15:21:49 RE: creating "job numbers"
Previous Message Richard H 2001-03-23 13:46:25 Re: SOME PL/PGSQL PROBLEMS