Changing table owners
Changing table owners
От:
Pete Bass <Peter.Bass@baedsl.co.uk>
Дата:
> How do I change the owner of a table ? > > ------------------------------------------------------------------------ > > * From: Daniele Orlandi > * To: pgsql-general@postgreSQL.org > * Subject: How do I change the owner of a table ? > * Date: Thu, 27 Aug 1998 18:31:57 +0200 > > ------------------------------------------------------------------------ > > I'm not able to figure out how to change the owner of a relation, in particular > of a table. > > Do I need to directly modify one of the pg_* tables ? > > Thanks in advance! > > -- > Daniele > Try: (a) granting permissions to new owner (b) update pg_class set relowner = $new_owner where relname = '$table_name' (c) update pg_type set typowner = $new_owner where typname = '$table_name' Hope this works. I've just tried this, and it seems to work, but if anyone has any better ideas, could you please let us know. Thanks Pete