Relation does not exist when trying to grant privileges
Documentation about GRANT PRIVILEGES says that your version GRANT command is suitable for grant rights to table. If you want to grant rights to database you should use GRANT ALL PRIVILEGES ON DATABASE projectname TO projectname;
. Below I show the results of this commands:
postgres=# CREATE USER projectname WITH PASSWORD 'projectname';CREATE ROLEpostgres=# CREATE DATABASE projectname;CREATE DATABASEpostgres=# GRANT ALL PRIVILEGES ON projectname TO projectname;ERROR: relation "projectname" does not existpostgres=# GRANT ALL PRIVILEGES ON DATABASE projectname TO projectname;GRANT