SQLite Forum

Bug: `GENERATED ALWAYS` constraint ends up in column type
Login
Some of the tokens forming a `GENERATED ALWAYS` column constraint
sometimes end up in the column type. I think this is inconsistent
with the syntax diagrams (when these tokens are interpreted as
`type-name` they cannot also be interpreted as constraint syntax)
and internally inconsistent (e.g., this happens with anonymous
column constraints, but does not happen if the column constraint
is named):

```
sqlite> create table t1(id int, x int generated always as (true));
sqlite> create view v1 as select * from t1;
sqlite> create table t2(id int, x int constraint c generated always as (true));
sqlite> create view v2 as select * from t2;
sqlite> select * from PRAGMA_TABLE_XINFO('t1');
cid  name  type                  notnull  dflt_value  pk  hidden
---  ----  --------------------  -------  ----------  --  ------
0    id    int                   0                    0   0     
1    x     int generated always  0                    0   2     
sqlite> select * from PRAGMA_TABLE_XINFO('t2');
cid  name  type  notnull  dflt_value  pk  hidden
---  ----  ----  -------  ----------  --  ------
0    id    int   0                    0   0     
1    x     int   0                    0   2     
```