psql create database 命令使用我系统上不同数据库的内容预填充数据库
psql create database command pre-populates database with contents of a different database on my system
我的 postgres 设置 运行 遇到了一个非常奇怪的情况,我不知道从哪里开始,我以前从未见过这样的事情。这就是我正在做的:
psql template1;
drop database target_database;
create database target_database;
\c target_database;
现在,如果我这样做:
\d
target_database
具有我系统上不同数据库的所有内容。 43 个表,全部填充了数据。例如,select count(*) from users
returns 1240。结构和数据与我系统上的另一个数据库完全相同。
我不确定从哪里开始寻找。感谢任何帮助。
By default, the new database will be created by cloning the standard system database template1
.
默认模板数据库中是否有相同的对象?
我的 postgres 设置 运行 遇到了一个非常奇怪的情况,我不知道从哪里开始,我以前从未见过这样的事情。这就是我正在做的:
psql template1;
drop database target_database;
create database target_database;
\c target_database;
现在,如果我这样做:
\d
target_database
具有我系统上不同数据库的所有内容。 43 个表,全部填充了数据。例如,select count(*) from users
returns 1240。结构和数据与我系统上的另一个数据库完全相同。
我不确定从哪里开始寻找。感谢任何帮助。
By default, the new database will be created by cloning the standard system database
template1
.
默认模板数据库中是否有相同的对象?