I have a Postgres database with a schema named foo
owned by a user also named foo
, which also owns all of the tables in it.
While logged in as foo
, I created a user bar
and granted it everything foo
:
grant foo to bar;
grant all on all tables in schema foo to bar;
grant all on all sequences in schema foo to bar;
Now, logged in as bar
, I attempt to alter a table in the foo
schema:
alter table foo.baz add column col1 varchar(1);
And I get the error:
ERROR: must be owner of table baz
Why won't Postgres let bar
, as a member of foo
, alter one of foo
's tables? From everything I've read, granting the role should do the trick.