有奖捉虫:行业应用 & 管理与支持文档专题 HOT

增加一个复合类型

postgres=# create type my_type as (f1 int,f2 varchar(10));
CREATE TYPE

数据表使用复合类型

postgres=# create table t_my_type (f1 int,f_my_type my_type);
CREATE TABLE
postgres=# insert into t_my_type values(1,row(1,'tdsql_pg'));
INSERT 0 1
postgres=# select f1,(f_my_type).f2 from t_my_type;
f1 | f2
----+-------
1 | tdsql_pg
(1 row)