citusdata / citusdata/citus

Distributed relations cannot have UNIQUE, EXCLUDE, or PRIMARY KEY constraints that do not include the partition column (with an equality operator if EXCLUDE).

Open
#6,521 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
12.8k
Forks
794
Avg merge
2d 14h
Merged PRs (30d)
31

Description

I have a table and use the citus extension.
```
CREATE TABLE IF NOT EXISTS uid_service
(
id BIGSERIAL PRIMARY KEY,
m_uid VARCHAR(56) NOT NULL UNIQUE,
ip_address inet NOT NULL,
created_at TIMESTAMP WITHOUT TIME ZONE DEFAULT NOW()
);
```

When I want to create the distributed table I see the
`Distributed relations cannot have UNIQUE, EXCLUDE, or PRIMARY KEY constraints that do not include the partition column (with an equality operator if EXCLUDE).`
why or does any solution to this problem? Because I need the unique columns

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.