Changing table owners - Mailing list pgsql-general

From Pete Bass
Subject Changing table owners
Date
Msg-id 37986D3B.4EB144F3@baedsl.co.uk
Whole thread Raw
List pgsql-general
> How do I change the owner of a table ?
>
>   ------------------------------------------------------------------------
>
>    * From: Daniele Orlandi <daniele@orlandi.com>
>    * 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


pgsql-general by date:

Previous
From: Stef
Date:
Subject: Running problems on IRIX 6.5
Next
From: "Maxim Penzin"
Date:
Subject: