From the course: PostgreSQL Essential Training
Unlock the full course today
Join today to access over 24,500 courses taught by industry experts.
Grant privileges to a role - PostgreSQL Tutorial
From the course: PostgreSQL Essential Training
Grant privileges to a role
- [Instructor] We just added the hr_manager role to the Postgres server, and now we can test it out and explore how roles can be used to place boundaries on a user's access privileges. Select the kineteco database and then click the Query tool. I've added a number of queries saved in the course Exercise Files. Now I'm just going to paste them in here so we can go through them all, line by line. First, we can take a current look at the database. In order to execute just a single command, you can highlight it in the script first before pressing the Execute button. So I'll select everything from the manufacturing.products table, and we can see these results. Then I can select everything from the human_resources.employees table, and I see a different set of results. So as the Postgres superuser, we can access all of the data in the database. Now let's switch our role. I'm going to impersonate the hr_manager with…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.