You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In RisingWave, when inserting into a table with a generated column, RisingWave automatically removes the generated column during the insert column mapping. However, PostgreSQL does not do this.
postgres=# create table t(v1 int, v2 int GENERATED ALWAYS AS (v1+1) STORED, v3 int default 10);
CREATE TABLE
postgres=# insert into t values (0, 1);
ERROR: cannot insert a non-DEFAULT value into column "v2"
DETAIL: Column "v2" is a generated column.
postgres=# insert into t(v1, v3) values (0, 1);
INSERT 01
postgres=# insert into t values (0, 1, 2);
ERROR: cannot insert a non-DEFAULT value into column "v2"
DETAIL: Column "v2" is a generated column.
The text was updated successfully, but these errors were encountered:
st1page
changed the title
bug: not compatible with PG when binding insert into table with generated column
not compatible with PG when binding insert into table with generated column
Jul 9, 2024
In RisingWave, when inserting into a table with a generated column, RisingWave automatically removes the generated column during the insert column mapping. However, PostgreSQL does not do this.
risingwave/src/frontend/src/catalog/table_catalog.rs
Lines 432 to 436 in 9dabb6e
RW behavior:
PG behavior: (PostgreSQL 16.2)
The text was updated successfully, but these errors were encountered: