重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 612|回复: 0
打印 上一主题 下一主题

opengauss创建数据库的模板变化

[复制链接]
跳转到指定楼层
楼主
发表于 2022-11-17 13:13:53 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
高斯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=#




分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-4-20 16:36 , Processed in 0.089379 second(s), 20 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表