Postgresql Error: user nijam has no permission for table accounts
Cause: You are not the owner of the table or the owner has not granted you the proper permissions
Depending on what sort of authentication methods (trust, md5, etc. ) you have setup, you might receive the following error when attempting to work with a particular table. This is usually caused by creating the table as say user 'postgres', and then attempting to use it as user 'bob'. There are two possible solutions to this problem:
Change the ownership of the table to the user you need. You will need to login as the current owner or a superuser account and execute ALTER TABLE table_name OWNER TO new_owner_name
You can also GRANT other users to access this account with GRANT ALL ON table_name TO user_name. Please note this will give the user full access to select, insert, update, and delete from this table. You can limit their access to SELECT access with GRANT SELECT ON table_name TO user_name
Ref:
PostgreSQL Grant
PostgreSQL Revoke
PostgreSQL Privileges Assigning
Depending on what sort of authentication methods (trust, md5, etc. ) you have setup, you might receive the following error when attempting to work with a particular table. This is usually caused by creating the table as say user 'postgres', and then attempting to use it as user 'bob'. There are two possible solutions to this problem:
Change the ownership of the table to the user you need. You will need to login as the current owner or a superuser account and execute ALTER TABLE table_name OWNER TO new_owner_name
You can also GRANT other users to access this account with GRANT ALL ON table_name TO user_name. Please note this will give the user full access to select, insert, update, and delete from this table. You can limit their access to SELECT access with GRANT SELECT ON table_name TO user_name
Ref:
PostgreSQL Grant
PostgreSQL Revoke
PostgreSQL Privileges Assigning
Comments
Post a Comment