From: | Melvin Davidson <melvin6925(at)gmail(dot)com> |
---|---|
To: | Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Colin 't Hart" <colinthart(at)gmail(dot)com>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: How to ALTER EXTENSION name OWNER TO new_owner ? |
Date: | 2017-08-09 17:41:14 |
Message-ID: | CANu8FiwUHNbRkpVCGRkzqvQZVxTm1v9NsrRWkWU-KKD-W-xfqQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Wed, Aug 9, 2017 at 12:19 PM, Scott Marlowe <scott(dot)marlowe(at)gmail(dot)com>
wrote:
> On Wed, Aug 9, 2017 at 10:10 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > Melvin Davidson <melvin6925(at)gmail(dot)com> writes:
> >> *UPDATE pg_extension SET extowner = {oid_of_new_owner} WHERE
> extowner =
> >> {oid_from_above_statement};*
> >
> > Note you'll also have to modify the rows in pg_shdepend that reflect
> > this ownership property.
>
> Seems like something that should be handled by alter doesn't it?
>
*In keeping with what Tom advised, the SQL to do that would be"UPDATE
pg_shdepend SET refobjid = {oid_of_new_owner} WHERE refobjid = {oid_of
old_owner} AND deptype = 'o';*
*However, as Scott suggested, there should definitely be an ALTER statement
to change the owner of the extension *
*and that does the work required.*
*IE: ALTER EXTENSION name OWNER TO new_owner;*
*Perhaps in Version 10 or 11?*
*-- *
*Melvin DavidsonI reserve the right to fantasize. Whether or not you wish
to share my fantasy is entirely up to you. *
From | Date | Subject | |
---|---|---|---|
Next Message | Dan | 2017-08-09 17:50:52 | Re: Data checksum with pg upgradecluster |
Previous Message | Tom Lane | 2017-08-09 17:37:47 | Re: How to ALTER EXTENSION name OWNER TO new_owner ? |