From: | Pete Bass <Peter(dot)Bass(at)baedsl(dot)co(dot)uk> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Changing table owners |
Date: | 1999-07-23 13:25:16 |
Message-ID: | 37986D3B.4EB144F3@baedsl.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> How do I change the owner of a table ?
>
> ------------------------------------------------------------------------
>
> * From: Daniele Orlandi <daniele(at)orlandi(dot)com>
> * To: pgsql-general(at)postgreSQL(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Stef | 1999-07-23 14:13:39 | Running problems on IRIX 6.5 |
Previous Message | Hub.Org News Admin | 1999-07-23 05:57:43 |