$ psql -U postgres postgres postgres=# update pg_database set datistemplate = false where datname='template1'; UPDATE 1 postgres=# drop database template1; DROP DATABASE postgres=# create database template1 template=template0; CREATE DATABASE postgres=# update pg_database set datistemplate = true where datname='template1'; UPDATE 1 postgres=#
重建postgresql模板数据库template1
最新推荐文章于 2025-03-29 16:34:47 发布
本文演示了如何使用psql命令行工具来更新PostgreSQL中的模板数据库。包括设置模板状态、删除及重新创建模板1数据库的过程。
848

被折叠的 条评论
为什么被折叠?



