TDSQL-C PostgreSQL 版 账号管理

postgres=> select tdsqlc_version(); tdsqlc_version ———————- TDSQLCPG v10.17-r1.2(1 row)。

相关产品
TDSQL-C PostgreSQL 版 产品页,含版本规格、价格与购买入口。

一、建表使用

postgres=# create table x(x1 int, x2 int);CREATE TABLEpostgres=# insert into x values(1, 2);INSERT 0 1postgres=# update x set x1 = 1;UPDATE 1

二、创建视图

postgres=# create view v_x as select * from x;CREATE VIEWpostgres=# select * from v_x; x1 | x2——+—— 1 | 2(1 row)

三、查询使用

postgres=# select * from x; x1 | x2——+—— 1 | 2(1 row)

四、系统表

TDSQL-C PostgreSQL 版完全支持 PG10 系统表,例如 pg_class, pg_proc 等。

五、GUC 参数

TDSQL-C PostgreSQL 版兼容 PG10 的 GUC 参数,使用 SHOW 或者 SET 命令可以显示和设置 GUC 参数。

六、index

TDSQL-C PostgreSQL 版支持多种索引:B-tree、Hash、GiST、SP-GiST、GIN 以及 BRIN,默认的 CREATE INDEX 创建的是 B-tree 索引。

七、多列和单列索引

postgres=# CREATE TABLE test2 (postgres(# major int,postgres(# minor int,postgres(# name varcharpostgres(# );CREATE TABLE

八、支持多列索引

postgres=# CREATE INDEX test2_mm_idx ON test2 (major, minor);CREATE INDEX

九、支持单列索引

postgres=# CREATE INDEX test2_mm ON test2 (name);CREATE INDEX

十、表达式索引

与 PG10 兼容,TDSQL-C PostgreSQL 版支持表达式索引。

postgres=# CREATE INDEX test2_expr ON test2 ((major + minor));CREATE INDEX

赞 (0)
上一篇 4天前
下一篇 4天前