Re: Extracting \ Generate DDL for existing object permissions

Поиск
Список
Период
Сортировка
От Tino Wildenhain
Тема Re: Extracting \ Generate DDL for existing object permissions
Дата
Msg-id 48364B5F.5060404@wildenhain.de
обсуждение исходный текст
Ответ на Re: Extracting \ Generate DDL for existing object permissions  (Raymond O'Donnell <rod@iol.ie>)
Список pgsql-general
Raymond O'Donnell wrote:
> On 22/05/2008 22:33, smiley2211 wrote:
>
>> 1) dump database A - 2) Extract permissions from database B - (HOW????)
>
> How about dumping B using the plain-text format, then running the output
> through grep, looking for lines starting with "GRANT..."?

Hint: sometimes easier is to run pg_dump -fc and then pg_restore -l to
create an object list and operate your filters on this list, then use
the resulting list with pg_restore -L

With GRANTS, which are one-liners, it works either way. But the general
approach works very well with any statement, think of multiline create
table, create function ...

Cheers
Tino

Вложения

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

Предыдущее
От: "Gurjeet Singh"
Дата:
Сообщение: Re: Is this correct usage of generate_series?
Следующее
От: Sushant Sinha
Дата:
Сообщение: Re: Fragments in tsearch2 headline