Cannot create a new table after “DROP SCHEMA public”
问题 Since I wanted to drop some tables and somebody suggested the below and I did it: postgres=# drop schema public cascade; DROP SCHEMA postgres=# create schema public; CREATE SCHEMA Then I got problem when creating a new database, such as: postgres=# create database test; CREATE DATABASE postgres=# \c test You are now connected to database "test" as user "postgres". test=# create table hi(id int primary key); *ERROR: no schema has been selected to create in* You can see I got error ERROR: no