May 2017
Beginner to intermediate
328 pages
7h 17m
English
First we need to create a server:
CREATE SERVER fdw_sqlserver_test FOREIGN DATA WRAPPER ogr_fdw OPTIONS ( datasource 'MSSQL:server=CM_DOM\MSSQLSERVER12;database=hgis;UID=postgres_fdw;PWD=postgres_fdw', format 'MSSQLSpatial');
If you're using Postgre SQL 9.5+, you can use the IMPORT SCHEMA command:
IMPORT FOREIGN SCHEMA "dbo.Wig100_skorowidz" FROM SERVER fdw_sqlserver_test INTO data_linked;
Otherwise you will have to specify the table schema explicitly:
CREATE FOREIGN TABLE data_linked.dbo_wig100_skorowidz (fid integer , geom public.geometry , oid integer , gid integer , version integer , godlo character varying ...
Read now
Unlock full access