I know this might have been asked many times already. But I did go through similar questions and answers but still get no clue.
I am member of both role A and B in postgres, I connect to database (PGadmin) as role A and I want to change the ownership of a table (owned by role A) under a schema (also owned by role A) to role B with:
<code>ALTER TABLE xxxx.xxx OWNER TO roleB;
</code>
<code>ALTER TABLE xxxx.xxx OWNER TO roleB;
</code>
ALTER TABLE xxxx.xxx OWNER TO roleB;
I have checked that role B can create new schema and new table.
But I still get the error of:
<code>ERROR: must be member of role "roleB"
SQL state: 42501
</code>
<code>ERROR: must be member of role "roleB"
SQL state: 42501
</code>
ERROR: must be member of role "roleB"
SQL state: 42501