1
我寫這篇PostgreSQL的代碼行,但我有以下錯誤:postgres_fdw錯誤無法連接服務器
ERROR: could not connect to server "server\sqlexpress"
SQL state: 08001
我在做什麼錯?
我的代碼:
在Windows 8.1和MS SQL快遞2012使用PostgreSQL 9.3相同的Windows
CREATE EXTENSION posgres_fdw;
Query returned successfully with no result in 11 ms.
CREATE SERVER "server\SQLExpress" FOREIGN DATA WRAPPER postgres_fdw
OPTIONS (host 'localhost', dbname 'andesmar');
Query returned successfully with no result in 12 ms.
CREATE USER MAPPING FOR public SERVER "server\sqlexpress"
OPTIONS (user 'sa', password '1234');
Query returned successfully with no result in 12 ms.
CREATE FOREIGN TABLE datosplataforma (
id bigint NOT NULL,
messagedate date NOT NULL,
receiveddate date NOT NULL,
latitude real,
longitude real,
GPSspeed real,
bearingangle integer,
odometer integer,
eventtypeid integer,
vehicleid integer,
alertid integer
)
SERVER "server\sqlexpress";
Query returned successfully with no result in 12 ms.
select * from datosplataforma;
ERROR: could not connect to server "server\sqlexpress"
SQL state: 08001