postgres index for finding distinct column code example
Example: postgresql make each element in array distinct
SELECT ARRAY(SELECT DISTINCT unnest(t_column)) FROM t_name;
SELECT ARRAY(SELECT DISTINCT unnest(t_column)) FROM t_name;