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 ....  (Tom Lane <tgl@sss.pgh.pa.us>)
Список 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 по дате отправления:

Предыдущее
От: Alex Hunsaker
Дата:
Сообщение: Re: Sorting performance vs. MySQL
Следующее
От: dipti shah
Дата:
Сообщение: Re: Minor systax error but not able to resolve it...