I added the user myuserto Postgres.
Then I added the database mydatabase in the pgAdmin III GUI and restored from a backup file. So the owner of mydatabase is the superuser postgres.
Then I tried to give all rights to access and modify mydatabase to myuser. I logged into psql as user postgres:
psql -d template1 -U postgres
and then I ran this query:
GRANT ALL PRIVILEGES ON DATABASE mydatabase TO myuser
Now I can use myuser to log, but if I try a simple query I get this error:
ERROR: permission denied for relation table_name
Am I missing something? Can you help me solve that?