DB: unique index with include column possible?

I would like to create a covering unique index having two columns like:

unique_name TEXT,
is_active BOOLEAN

My goal is to achieve uniqueness only on the column 'unique_name' but to also include the is_active column in the index in order to avoid table lookups. If I simply add the column 'is_active' to the index it will spread uniqueness over both columns. Therefore it is possible to store 2 identical names 'Name1' within the table having 'is_active' = true and 'is_active' = false.

I did not find the possibility to create a unique index that additionaly includes other column(s).

Postgres syntax would then be:

CREATE UNIQUE INDEX index_name ON table_name (unique_column) INCLUDE (additional_column);

Question: Did I miss something or is that a "missing feature" in XANO?

Thank you in advance for your help!
- Daniel

1
2 replies