PostgreSQL: Create schema in specific database

You can connect to the database, and execute the “CREATE SCHEMA” statement. That should result in a new schema in that database. It’s not as tough as you think 😉 When you want to do this from a .SQL file instead, you can use the \connect command as such:

 CREATE DATABASE foo;
 \connect foo;
 CREATE SCHEMA yourschema;

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)