FOREIGN KEY composite_type.its_field REFERENCES ....

Поиск
Список
Период
Сортировка
От Belka Lambda
Тема FOREIGN KEY composite_type.its_field REFERENCES ....
Дата
Msg-id 44921266941114@webmail48.yandex.ru
обсуждение исходный текст
Ответы Re: FOREIGN KEY composite_type.its_field REFERENCES ....
Список pgsql-general
Hi everyone!

Is there a way to construct FOREIGN KEYs  from parts of composite-typed field?

The code returns an error:
-----------------------------------------
create table aaa (
a_id integer primary key,
a_str varchar)
;
create type content_of_bbb (a_id integer, b_str varchar);

create table bbb (
b_id integer primary key,
bbb_content content_of_bbb,
foreign key (bbb_content.a_id) references aaa(a_id)
);
-----------------------------------------
, so I suspect it's impossible. Is it?

Belka

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