Add IF NOT EXISTS logic to create_distributed_table()
Open
- Dominant language
- C
- Stars
- 12.8k
- Forks
- 794
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 31
Description
In a current implementation `create_distributed_table()` returns error if table is already created and distributed. It makes difficult to implement scenario with dynamic idempotent table creation, e.g.
```sql
CREATE TABLE IF NOT EXISTS new_table
(
user_id VARCHAR,
time timestamptz,
data jsonb
);
SELECT create_distributed_table('new_table', 'user_id');
```
It would be nice to have an ability to disable the error via a parameter or another function like `create_if_not_exists_distributed_table()`
Contributor guide
Assessment
This issue has not been assessed yet.