Re: Extracting \ Generate DDL for existing object permissions - Mailing list pgsql-general

From Tino Wildenhain
Subject Re: Extracting \ Generate DDL for existing object permissions
Date
Msg-id 48364B5F.5060404@wildenhain.de
Whole thread Raw
In response to Re: Extracting \ Generate DDL for existing object permissions  (Raymond O'Donnell <rod@iol.ie>)
List 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

Attachment

pgsql-general by date:

Previous
From: "Gurjeet Singh"
Date:
Subject: Re: Is this correct usage of generate_series?
Next
From: Sushant Sinha
Date:
Subject: Re: Fragments in tsearch2 headline