Foreign key constraint on sub-column of composite-type column

Поиск
Список
Период
Сортировка
От David Lee
Тема Foreign key constraint on sub-column of composite-type column
Дата
Msg-id 840CE09C-048A-4D91-9A11-4BE75D31C581@gmail.com
обсуждение исходный текст
Ответы Re: Foreign key constraint on sub-column of composite-type column
Список pgsql-hackers
Hi,

I was trying to create foreign key constraints on a sub-column of a composite-type column, but couldn't find a way to
doit. After asking around on IRC, it seems like this isn't supported in PostgreSQL. 

I wanted to do something like:
create type profile as (account_id integer);
create table users (profile profile);
alter table users add constraint account_fk foreign key ((profile).account_id) references accounts;

Would this be a viable feature request?

--David


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

Предыдущее
От: Will Leinweber
Дата:
Сообщение: patch to add \watch to psql
Следующее
От: Abhijit Menon-Sen
Дата:
Сообщение: Re: patch to add \watch to psql