Postgres 级别:
新手
场景
我正在阅读一些 Postgres 教程并使用chinook 数据库,我必须对search_pathor 用户做了一些事情,role因为现在每当我输入时,CREATE DATABASE我都会默认获得 2 个模式public和chinook. 我不知道为什么。
脚步
psql> CREATE DATABASE foo;
psql> \c foo
psql (12.2, server 11.6)
You are now connected to database "foo" as user "username".
psql> \dn
Name | Owner
---------+----------
chinook | username
public | postgres
psql> \dt chinook.*
List of relations
Schema | Name | Type | Owner
---------+---------------+-------+-------
chinook | album | table | username
chinook | artist | table | username
chinook | cars | table | username
chinook | color | table | username
chinook | commitlog | table | username
chinook | customer | table | username
chinook | employee | table | username
chinook | genre | table | username
chinook | invoice | table | username
chinook | invoiceline | table | username
chinook | mediatype | table | username
chinook | playlist | table | username
chinook | playlisttrack | table | username
chinook | track | table | username
问题
一个全新的数据库会导致chinook模式及其所有表与'public模式一起被添加。
我想回到
CREATE DATABASE foo只使用模式创建数据库的时间public。我不想要chinook架构。我是怎么到这种境地的?
谢谢