Search Postgresql Archives

Re: Extracting \ Generate DDL for existing object permissions

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

 



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: smime.p7s>>


[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