本文为您介绍如何使用查询结果创建数据表。 teledb=# insert into t values(1,'teledb'); INSERT 0 1 teledb=# create table t_as as select * from t; INSERT 0 1 teledb=# select * from t_as; id | mc ----+---------- 1 | teledb (1 row)
本文为您介绍如何使用查询结果创建数据表。 teledb=# insert into t values(1,'teledb'); INSERT 0 1 teledb=# create table t_as as select * from t; INSERT 0 1 teledb=# select * from t_as; id | mc ----+---------- 1 | teledb (1 row)
DB_NAME:表pg_repack_test所在的数据库。 查看清理后的表大小 select pg_size_pretty(pg_relation_size('pg_repack_test')); 常见问题 Q1:报错:“pg_repack failed with error: You must be a superuser to use pg_repack”。 A1:执行pg_repack时加上--no-superuser-check,跳过超级用户检查。