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 do it. 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

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to