Foreign key referencing subclasses.

Поиск
Список
Период
Сортировка
Искать
От
Johannes Grødem
Тема
Foreign key referencing subclasses.
Дата
Msg-id
20010322151847.A26189@unity.copyleft.no
Список
Дерево обсуждения
Foreign key referencing subclasses. Johannes Grødem <johs@copyleft.no>
Re: Foreign key referencing subclasses. Christof Glaser <gcg@gl.aser.de>
Re: Foreign key referencing subclasses. Johannes Grødem <johs@copyleft.no>
Re: Foreign key referencing subclasses. Stephan Szabo <sszabo@megazone23.bigpanda.com>
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.
FAQ