0

I'm logged in as a user in postgres with PgAdmin tool in Linux connecting remotely but I don't think the user has enough rights. I'm a MySQL experienced user but not so much in Postgres. When I select a table when logged in as the user I get

An error has occurred:

ERROR: permission denied for relation acs_activities

how do I add my user "gainpm" to have access to all tables in "projop" database?

asked Jun 8, 2015 at 15:24

2 Answers 2

1

You should log in as the table owner (the user you used to create the tables) and then grant the necessary privileges to your user:

grant select on acs_activities to your_user;

If you want to do that for all tables, you can use:

grant select on all tables in schema public to you_user;

Or maybe you created them as the superuser, but your regular user should be the real owner, then you should do:

alter table acs_activities owner to your_user;
answered Mar 29, 2020 at 15:36
-1

I figured it out. First I had to login as superuser

sudo -u postgres psql

then issue

ALTER USER myuser WITH SUPERUSER;
answered Jun 8, 2015 at 17:57
1
  • Using a superuser for your regular work is a really bad idea. Do you also work as root all the time in Linux? Commented Mar 29, 2020 at 15:33

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.