So, I got in this situation:
I create a table (let say model_a), in this table I have 2 cols (let say col1 and col2).
I need a constraint that satisfy this reality:
model_a
col1 | col2
-----+-----
1 | 1 //first row
2 | 1 >> ok
1 | 1 >> ok
1 | 2 >> can not insert this row
It's not UNIQUE constraint, you can duplicate the first row.
The only one time this constraint active is col1 is the same but col2 is different.
Need help :smile: Thanks a lot!