mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
If a generated column uses the optional keywords GENERATE ALWAYS, try to avoid
putting those keywords in the typename of the column. [forum:/forumpost/ff3ffe09251c105b|Forum post ff3ffe09251c105b] FossilOrigin-Name: 3c954863f45271a3518acf51fd685a641878811fb5cfcbdbad85154aeccdc902
This commit is contained in:
@@ -585,5 +585,21 @@ do_execsql_test gencol1-20.2 {
|
||||
SELECT * FROM tab;
|
||||
} {2001-01-01 0 0 5 {}}
|
||||
|
||||
# 2021-07-30 forum https://sqlite.org/forum/forumpost/ff3ffe09251c105b?t=h
|
||||
#
|
||||
reset_db
|
||||
do_execsql_test gencol1-21.1 {
|
||||
CREATE TABLE t1(
|
||||
a integer primary key,
|
||||
b int generated always as (a+5),
|
||||
c text GENERATED ALWAYS as (printf('%08x',a)),
|
||||
d Generated
|
||||
Always
|
||||
AS ('xyzzy'),
|
||||
e int Always default(5)
|
||||
);
|
||||
INSERT INTO t1(a) VALUES(5);
|
||||
SELECT name, type FROM pragma_table_xinfo('t1');
|
||||
} {a integer b int c text d {} e {int}}
|
||||
|
||||
finish_test
|
||||
|
Reference in New Issue
Block a user