I'm trying to create and connect db using PostgreSQL and this SQLfile:
-- recreate the user --
REVOKE ALL PRIVILEGES ON DATABASE "playground" from student;
REASSIGN OWNED BY student TO postgres;
DROP DATABASE playground WITH (FORCE);
DROP USER student;
CREATE USER student WITH PASSWORD '1';
-- recreate the database --
CREATE DATABASE playground OWNER student;
GRANT ALL PRIVILEGES ON DATABASE "playground" TO student;
-- fulfill the database --
-- \connect playground student
\connect "dbname=playground user=student password=1"
BEGIN;
\i sql/schema.sql
\i sql/data.sql
COMMIT;
But when I try to run it using JDBC / IntelliJ idea I have an error
syntax error at or near \