Skip to content

Update does not work when setting generated column to default #3204

Description

@angelamayxie

The following query works in Postgres but errors out in Doltgres

postgres=# create table t1 (i int primary key, j int generated always as (i + 10) stored);
CREATE TABLE

postgres=# insert into t1 (i, j) values (1, default);
INSERT 0 1
postgres=# select * from t1;
 i | j  
---+----
 1 | 11
(1 row)

postgres=# update t1 set j = default where i = 1;
UPDATE 1

Doltgres error: ERROR: UPDATE: non-Doltgres type found in source: () (SQLSTATE XX000)

Test case skipped and tagged with issue link in dolthub/go-mysql-server#3705

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions