Created
February 14, 2017 18:13
-
-
Save Sillson/60e08ce26412ad4334baaa001926370d to your computer and use it in GitHub Desktop.
Create a foreign data connection in postgres
This file contains hidden or 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
CREATE SERVER [SERVER_NAME] | |
FOREIGN DATA WRAPPER postgres_fdw | |
OPTIONS (host '[YOUR_HOST]', port '[PORT]', dbname '[DB_NAME]', sslmode 'require'); | |
CREATE USER MAPPING FOR [DB_USER] | |
SERVER [SERVER_NAME] | |
OPTIONS (user '[FOREIGN_USER]', password '[FOREIGN_PW]'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment