FOREIGN KEY composite_type.its_field REFERENCES .... - Mailing list pgsql-general

From Belka Lambda
Subject FOREIGN KEY composite_type.its_field REFERENCES ....
Date
Msg-id 44921266941114@webmail48.yandex.ru
Whole thread Raw
Responses Re: FOREIGN KEY composite_type.its_field REFERENCES ....  (Tom Lane <tgl@sss.pgh.pa.us>)
List 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 by date:

Previous
From: Alex Hunsaker
Date:
Subject: Re: Sorting performance vs. MySQL
Next
From: dipti shah
Date:
Subject: Re: Minor systax error but not able to resolve it...