Anyone know what privilege I need to grant to a user so that it can TRUNCATE a table owned by another user?
Here is the error I am getting:
Code: Select all
cognos=> TRUNCATE TABLE user_hist;
ROLLBACK 3989: Must be owner of relation user_hist
Moderator: NorbertKrupa
Code: Select all
cognos=> TRUNCATE TABLE user_hist;
ROLLBACK 3989: Must be owner of relation user_hist
But I don't understand the part "Schema owner cannot truncate a table."Table owner or USAGE privilege on schema that contains the table. Schema owner cannot truncate a table.
Code: Select all
dbadmin=> \dt my_stats;
List of tables
Schema | Name | Kind | Owner | Comment
--------------+----------+-------+--------+---------
sys_stats | my_stats | table | l_sys |
(1 row)
The functionality seems to be the same even though the docs say it should be different - unless I'm missing somethingAlso be aware that 5.1 behavior in this area is different than 6.0.