Is there a constraint for values not being unique taking in consideration two columns, ex -
id | secondid
+---------------+
3 | 4
4 | 5
id | secondid
+---------------+
3 | 4
5 | 4
id | secondid
+---------------+
4 | 4
4 | 4
All the above cases are not okay, as 4 occurs twice in either id or secondid but something like
id | secondid
+---------------+
1 | 3
2 | 4
is okay as all the values in both the columns are unique, is there any way for me to achieve this without using any packages in postgresql?