简体   繁体   中英

pgAdmin Foreign data wrapper error when translating host name to address

I am trying to create a foreign data wrapper in pgAdmin, everything looks fine in terms of installing the wrapper extension, create a foreign data wrapper server, create a user map, until the very last step 'import foreign schema'.

CREATE SCHEMA AAA

IMPORT FOREIGN SCHEMA PUBLIC
from server xxx
into AAA; 

Error: could not connect to server xxx
Detail: could not translate host name xxx to address: name or service not known
SQL state: 08001

so what's wrong with my hostname?

The system DNS resolver could not look up the IP address of the hostname because, as it says, "name or service not known". Since 'xxx' is presumably not the real hostname, all I can say is figure out what the real hostname should be and then use it, or bypass DNS by plugging in the IP address directly.

This failure location is expected. None of the preceding steps attempt to contact the server, and so would not realize they were given an invalid one.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM