Re: Option to dump foreign data in pg_dump - Mailing list pgsql-hackers

From Luis Carril
Subject Re: Option to dump foreign data in pg_dump
Date
Msg-id LEXPR01MB0591231525A7FADBAEF01A30E7050@LEXPR01MB0591.DEUPRD01.PROD.OUTLOOK.DE
Whole thread Raw
In response to Re: Option to dump foreign data in pg_dump  (vignesh C <vignesh21@gmail.com>)
Responses Re: Option to dump foreign data in pg_dump
List pgsql-hackers

Thanks for working on the comments. I noticed one behavior is
different when --table option is specified. When --table is specified
the following are not getting dumped:
CREATE SERVER foreign_server

I felt the above also should be included as part of the dump when
include-foreign-data option is specified.

Yes, it also happens on master. A dump of a foreign table using --table, which only dumps the table definition, does not include the extension nor the server.
I guess that the idea behind --table is that the table prerequisites should already exist on the database.

A similar behavior can be reproduced for a non foreign table. If a table is created in a specific schema, dumping only the table with --table does not dump the schema definition.

So I think we do not need to dump the server with the table.

Cheers

Luis M Carril

pgsql-hackers by date:

Previous
From: Konstantin Knizhnik
Date:
Subject: Re: [Proposal] Global temporary tables
Next
From: Amit Langote
Date:
Subject: Re: adding partitioned tables to publications