Skip to content

Separate external_id vs alias #1775

Description

@adityathebe

The external_users_aliases_key UNIQUE btree constraint on the aliases text[] column only checks if the entire array is identical across rows, not whether individual elements overlap.

-- Both succeed despite sharing 'alice@example.com'
INSERT INTO external_users (..., aliases) VALUES (..., '{alice@example.com}');
INSERT INTO external_users (..., aliases) VALUES (..., '{alice@example.com,bob@example.com}');

Two external users can end up with the same alias, which breaks the assumed invariant that aliases are globally unique.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions