Skip to content

Commit

Permalink
exclude partial indexes from unique index check
Browse files Browse the repository at this point in the history
  • Loading branch information
olirice committed Jul 10, 2024
1 parent f75d7af commit 452a5d1
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 32 deletions.
2 changes: 1 addition & 1 deletion sql/load_sql_context.sql
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ select
),
array[]::text[]
),
'is_unique', pi.indisunique,
'is_unique', pi.indisunique and pi.indpred is null,
'is_primary_key', pi.indisprimary
)
)
Expand Down
62 changes: 31 additions & 31 deletions test/expected/issue_542_partial_unique.out
Original file line number Diff line number Diff line change
Expand Up @@ -79,37 +79,37 @@ begin;
}
$$)
);
jsonb_pretty
---------------------------------------------
{ +
"data": { +
"__type": { +
"kind": "OBJECT", +
"fields": [ +
{ +
"name": "nodeId", +
"type": { +
"kind": "NON_NULL",+
"name": null +
} +
}, +
{ +
"name": "workId", +
"type": { +
"kind": "NON_NULL",+
"name": null +
} +
}, +
{ +
"name": "work", +
"type": { +
"kind": "NON_NULL",+
"name": null +
} +
} +
] +
} +
} +
jsonb_pretty
-------------------------------------------------------
{ +
"data": { +
"__type": { +
"kind": "OBJECT", +
"fields": [ +
{ +
"name": "nodeId", +
"type": { +
"kind": "NON_NULL", +
"name": null +
} +
}, +
{ +
"name": "workId", +
"type": { +
"kind": "NON_NULL", +
"name": null +
} +
}, +
{ +
"name": "readthroughsCollection",+
"type": { +
"kind": "NON_NULL", +
"name": null +
} +
} +
] +
} +
} +
}
(1 row)

Expand Down

0 comments on commit 452a5d1

Please sign in to comment.