citusdata / citusdata/citus

Distributed foreign table creation fails with confusing message when column types are different

Open
#958 1 comment 1 reaction 0 assignees View on GitHub
bug
Dominant language
C
Stars
12.8k
Forks
794
Avg merge
2d 14h
Merged PRs (30d)
31

Description

```sql
create table t1(a int unique, b int);
create table t2(a bigint references t1(a), b int);
select create_distributed_table('t1', 'a');
select create_distributed_table('t2', 'a');
```

Result
```
ERROR: cannot create foreign key constraint
DETAIL: Foreign key constraint can only be created on co-located tables.
```
Expected:
Error message should direct user to use same types in referring and referred 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.