Postgres Creating Schema in a specific database
问题 I got one suggestion form stackoverflow.com to create schema in a specific database as follows: CREATE DATABASE foo; \connect foo; CREATE SCHEMA yourschema; But I am getting error as follows: ERROR: syntax error at or near "\" LINE 2: \connect foo; ^ *** Error ** * ERROR: syntax error at or near "\" Situation : Login as postgress create user u1 create database db1 with owner u1 \connect u1 create schema s1 Please help me in creating schema in a specific db. 回答1: This works, if - and only if -