I have a process where user A creates a table and user B tries to create an index on the new table, owned by A. Users A and B are from the same group but user B is an automated process.
Is it possible to create an index from a user that is not the owner of the table, but is in the table's owner group?
Best Answer
You will need to assign ownership of the table to the group the two users have in common.
Demo:
Setup:
Without further changes, here's what happens if
user2
tries to add an index ont1.x
:The solution is to grant the table ownership to the shared role. As
user1
or a superuser:now: