Foreign key referencing subclasses.

Поиск
Список
Период
Сортировка
От Johannes Grødem
Тема Foreign key referencing subclasses.
Дата
Msg-id 20010322151847.A26189@unity.copyleft.no
обсуждение исходный текст
Ответы Re: Foreign key referencing subclasses.  (Christof Glaser <gcg@gl.aser.de>)
Re: Foreign key referencing subclasses.  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-sql
Hi,

it seems I can't have a foreign key that references some subclass.  Postgres
says it can't figure out what its primary key is.  The primary key is defined
in the superclass.

I have something like this:

CREATE TABLE resource_record( rrid SERIAL -- etc.
);

CREATE TABLE soa_record( -- blah, blah
) INHERITS(resource_record);

CREATE TABLE domain( -- ... soaid REFERENCES soa_record  -- *
);


* = This doesn't work. I can reference resource_record here, but I can not   reference soa_record that way. Referencing
resource_record*doesn't work   either.
 

-- 
johs


В списке pgsql-sql по дате отправления:

Предыдущее
От: "Richard Huxton"
Дата:
Сообщение: Re: creating "job numbers"
Следующее
От: Antti Linno
Дата:
Сообщение: Birthday search.