changing the permission of _lots_ of tables

Поиск
Список
Период
Сортировка
От Roderick A. Anderson
Тема changing the permission of _lots_ of tables
Дата
Msg-id 457F4C57.9010308@acm.org
обсуждение исходный текст
Ответы Re: changing the permission of _lots_ of tables  (Richard Huxton <dev@archonet.com>)
Список pgsql-general
Back in September Bobby Gontarski asked about copy db1 to db2.

Jim Nasby came back with the suggestion of using db1 as the template for
creating db2.

Works great ... up to a point.  I now need to change the users and
owners associated with all the tables without changing their permissions.

Is there a way or hack to do mass changes like these.


After creating the database db2, adding db2dba and db2user, and
connecting to db2 I have:

    table_A ... table_I owned by db1dba and need to change those so the
owner is db2dba.

    db1user has SELECT, INSERT, UPDATE on table_A, table_C and table_I
but only SELECT on table_B, table_D ... table_H and I need to change
those to db2user.

As development continues; next month; db1 may have 2 new tables.

Any ideas or suggestions of ways to scriptify/automagically accomplish this?


TIA,
Rod
--

В списке pgsql-general по дате отправления:

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: Online index builds
Следующее
От: Kevin Murphy
Дата:
Сообщение: function accepting and returning rows; how to avoid parentheses