I have a view called
viw_insideworktime
and it makes a SELECT
for the worktime
table, however when trying to select the error below appears:
SELECT * FROM viw_insideworktime;
ERROR: permission denied for table worktime
I already tried to apply grants to the user, but the error persists.
The grant applied was as follows:
GRANT SELECT ON TABLE viw_insideworktime TO jobwork;
GRANT SELECT ON TABLE worktime TO jobwork;
However, if I try to access the table directly, the data is displayed.
**Solved:**
I solved the problem by deleting the view and applying the GRANT below:
GRANT SELECT ON viw_insideworktime TO jobwork;
GRANT SELECT ON worktime TO jobwork;
Was there any other solution without having to delete the view?
Asked by Tom
(438 rep)
Mar 31, 2023, 07:36 PM
Last activity: Jun 30, 2025, 09:00 PM
Last activity: Jun 30, 2025, 09:00 PM