高斯db创建数据库,模板默认为 template0 ,不指定,就是template0,但也不能指定template1,这个和pg是有区别的。
postgres=# select version();
version
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------
PostgreSQL 9.2.4 (openGauss 2.0.0 build 78689da9) compiled at 2021-03-31 21:04:03 commit 0 last mr on x86_64-unknown-linux-gnu, compiled by g++ (GCC) 7.3.0, 64-bit
(1 row)
--指定 template1 ,报错
postgres=# create database db2 template template1;
ERROR: template1 is not supported for using here, just support template0
--指定 tempate0,就可以。
postgres=# create database db2 template template0;
CREATE DATABASE
postgres=# \l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+-------+-----------+---------+-------+-------------------
db2 | omm | SQL_ASCII | C | C |
postgres | omm | SQL_ASCII | C | C |
template0 | omm | SQL_ASCII | C | C | =c/omm +
| | | | | omm=CTc/omm
template1 | omm | SQL_ASCII | C | C | =c/omm +
| | | | | omm=CTc/omm
(4 rows)
postgres=#
|