Last active
November 5, 2016 22:32
-
-
Save elmotec/efea4e7a1dc23b4bd359152b4c34a01f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- creates fdw to the database quotes in a schema quotes_s | |
create extension if not exists postgres_fdw; | |
create server prod_s foreign data wrapper postgres_fdw options (host 'servername', dbname 'quotes', port '5432'); | |
create user mapping for public server prod_s options (user 'name', password 'secret'); | |
create schema quotes_s; | |
import foreign schema public from server prod_s into quotes_s; | |
commit; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment