I already checked out this question, and thought I had the answer - but then it didn\'t look right to me.
I have the following pared down example:
CR
The documentation says:
Usually, the parent key of a foreign key constraint is the primary key of the parent table. If they are not the primary key, then the parent key columns must be collectively subject to a UNIQUE constraint or have a UNIQUE index.
In the pipelines
table, neither the name
nor the owner
columns are, by themselves, unique.
I guess you actually want to have a two-column foreign key in the tasks
table:
FOREIGN KEY(pipeline, owner) REFERENCES pipelines(name, owner)