CREATE USER newuser WITH PASSWORD 'your_secure_password' LOGIN;

CREATE DATABASE newdatabase WITH OWNER = newuser;

\c newdatabase

GRANT ALL PRIVILEGES ON DATABASE newdatabase TO newuser;
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA public TO newuser;
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA public TO newuser;