> I thought of creating a foreign key constraint this way:
>
> The constraint would need to make reference to the wbs_name assigned to
> the
> project, but at the table products, no column contains that info.
Add the wbs_name column to the products table. Since a code is invalid
without knowing which project it belongs to your table definition is wrong.
Then you can create the proper two-column foreign key that references on
primary key on the codes table.
David J.
--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Foreign-key-to-a-partial-key-tp5795291p5795296.html
Sent from the PostgreSQL - sql mailing list archive at Nabble.com.