Re: Retrieve "CREATE FOREIGN SERVER" with pg_dump ... --schema=

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

 



Hello David, 

I asked for a trick and I got one - will use --exclude-schemas=* accordingly. 

And yes: I could have come to this conclusion by myself ... It's been a long day ... 

Thx a million & KR 

p. 

Am Mo., 8. Juli 2024 um 18:33 Uhr schrieb David G. Johnston <david.g.johnston@xxxxxxxxx>:
On Mon, Jul 8, 2024 at 9:17 AM Peter Adlersburg <peter.adlersburg@xxxxxxxxx> wrote:

 What's the trick to use --schema= with pg_dump *AND* also have the foreign server definition and the user mappings copied?
 (I also included --schema=public but that changed nothing)
 

Create Server makes it clear it does not exist within a schema.

pg_dump has a note:

"Non-schema objects such as large objects are not dumped when -n is specified. You can add large objects back to the dump with the --large-objects switch."

The absence of any corresponding --server option in pg_dump to accomplish the same for the server non-schema object means that what you want to do is not presently possible.

Since you are doing partial dumps anyway - dump the non-schema objects first (-N *) ? then dump the desired schemas?  Then just perform two restores.

David J.


[Index of Archives]     [Postgresql Home]     [Postgresql General]     [Postgresql Performance]     [Postgresql PHP]     [Postgresql Jobs]     [PHP Users]     [PHP Databases]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Forum]

  Powered by Linux