I have a table wich one the columns is an ARRAY of smallint.
ID | Array
--------------------
1 | [1,2,3]
2 | [4,5,6]
3 | [7,8,9]
What I’m looking for is… a function where everytime I INSERT new data, first validates if a value of my new array is already in the table and get the duplicate values.
I know that OVERLAP(&&) resolves part of the issue, if I insert the array [1,4,11], [1,4] are my duplicate values, but OVERLAP only returns true, what I need is know which values are the one that already exist in the table.