Let's suppose I have a table in PorstreSQL defined as:
CREATE TABLE my_table (
id serial not null primary key,
var1 text null,
var2 text null unique,
var3 text null,
var4 text null unique
);
Is there a query to information_schema that provides the names of unique columns only? The desirable response should be:
var2
var4
The query should ignore unique keys for multiple columns together.