citusdata / citusdata/citus

Single table views can be used in UPDATE

Open
#2,216 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

Hi,

I have a simple table

```
CREATE TABLE test AS
SELECT
generate_series(1,10000000) AS id,
substr(concat(md5(random()::text), md5(random()::text)), 1, (random() * 64)::integer + 1) AS description, false as is_process;
```
and a view
```
create view test_view as select id, is_procesed from test;
```

Now I want to be able to update the view
```
update test_view set is_procesed = true ;
```
But end up with `ERROR: relation test_view is not distributed`

I think it's reasonable for a single table view to allow an update the same way as a table does.

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.