Re: Change owner for all tables in a database in one batch

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Alexander Farber <alexander(dot)farber(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: Change owner for all tables in a database in one batch
Date: 2013-03-06 13:19:48
Message-ID: 20130306131948.GS9507@alvh.no-ip.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alexander Farber escribió:

> Is there maybe a one-liner for changing the ownership in 1 batch
> or should I execute "alter table .... set owner to bukvy" one by one?

The command REASSIGN OWNED changes ownership of all objects owned by a
certain role. There's no way to restrict it to just tables, though.

--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chris Angelico 2013-03-06 13:57:28 Re: Finding matching words in a word game
Previous Message Alexander Farber 2013-03-06 12:30:44 Change owner for all tables in a database in one batch