DELETE FROM warehouse
WHERE id = ?
ERROR: permission denied for relation warehouse
Anyway, it is by design? If not, I think I can fix it.
CREATE ROLE "lsmb_demo__warehouse_delete" WITH INHERIT NOLOGIN;
GRANT DELETE ON warehouse TO "lsmb_demo__warehouse_delete";
With this role and permission you are able to set permission for delete.
Of course, instead of demo, you have to write your own database name, or in Roles.sql/Fixes.sql the
<?lsmb dbname ?>
My question, what happens, if a warehouse deleted, while there are items under the warehouse?
Fixed in [r6428]
New role and permission added for delete, so, if a user has no rights to delete, he/she will not able to delete an existing warehouse.
Please note: I did not find trigger for deleting warehouse - which enable or disable the delete based on items in that warehouse - , so, I cannot predict at this moment, what happens if there are items in the specified warehouse.
Delete is useful when one build up a warehouse system but accidentaly setup more than enough or want to wipe out never-used-warehouses. In other words, it could be handy on system setup.
Commit: <Commit 5164860434309d2e82ce4139:6428>