Search Postgresql Archives

Re: refactoring a database owner without "reassign owned"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff Janes <jeff.janes@xxxxxxxxx> writes:
> On Mon, May 13, 2013 at 2:00 PM, Alvaro Herrera <alvherre@xxxxxxxxxxxxxxx>wrote:
>> Jeff Janes escribió:
>>> I think "reassign owned" should detect that it is being invoked on the
>>> internal user (as it does now) but then instead of refusing to run, it
>>> should DWIM.

>> Hm, so what would you have it do, precisely?

>> From the users perspective, I would have it reassign ownership of exactly
> those objects which are not "required by the database system", as the error
> message puts it.

ISTM this is precisely *not* what REASSIGN OWNED should do.  Its charter
is to reassign all objects owned by the target role, not to second-guess
which ones the user meant.

I can see the possible value in a tool that would do what you suggest,
but I'm wary of sticking that functionality into REASSIGN OWNED.  In
practice, it seems likely that people who are in this kind of fix would
need more fine-grained control than that anyway.  Perhaps the right
thing is something close to your hack with pg_dump, wherein the tool
produces a file of ALTER OWNER commands and then the user can hand-edit
that before pulling the trigger.

			regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux