Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix: multiple unique constraints on single column (#35326)

Alaister Youngf18b08d2413f
diff --git a/apps/studio/data/table-editor/table-editor-query-sql.ts b/apps/studio/data/table-editor/table-editor-query-sql.ts
index ab3684b448b..6eba0bb798c 100644
--- a/apps/studio/data/table-editor/table-editor-query-sql.ts
+++ b/apps/studio/data/table-editor/table-editor-query-sql.ts
@@ -162,6 +162,7 @@ export function getTableEditorSql(id?: number) {
conkey[1] as ordinal_position
from pg_catalog.pg_constraint
where contype = 'u' and cardinality(conkey) = 1
+ group by conrelid, conkey[1]
) as uniques on uniques.table_id = a.attrelid and uniques.ordinal_position = a.attnum
left join (
select distinct on (conrelid, conkey[1])