VastbaseE100

基于开源技术的HTAP数据库管理系统。性能优异,稳定可靠,提供诸多专属领域特性。

Menu

兼容虚拟列语法

atlasdb=# CREATE TABLE gtest0 (a int PRIMARY KEY, b int GENERATED ALWAYS AS (55) STORED);
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "gtest0_pkey" for table "gtest0"
CREATE TABLE
atlasdb=# CREATE TABLE gtest1 (a int PRIMARY KEY, b int GENERATED ALWAYS AS (a * 2) STORED);
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "gtest1_pkey" for table "gtest1"
CREATE TABLE
atlasdb=# insert into gtest0(a ) values (111);
INSERT 0 1
atlasdb=# select * from gtest0;
  a  | b  
-----+----
 111 | 55
(1 row)

atlasdb=# insert into gtest1(a ) values (111);
INSERT 0 1
atlasdb=# select * from gtest1;
  a  |  b  
-----+-----
 111 | 222
(1 row)