Foreign Data Wrappers for PostGIS
The last couple weeks have seen two interesting updates in the world of PostgreSQL “foreign data wrappers” (FDW). Foreign data wrappers allow you to access remote data inside your database, exactly like other tables. PostgreSQL ships with two example implementations, one for accessing text files, and the other for accessing remote PostgreSQL servers.
The two updates of interest to PostGIS users are:
- The Oracle FDW implementation was recently enhanced to support spatial columns, so an Oracle table with SDO_GEOMETRY columns can be exposed in PostgreSQL as a table with PostGIS geometry columns.
- A new OGR FDW implementation was released that supports exposing any OGR data source as a table with PostGIS geometry columns.
Now you can access your PostGIS data without even going to the trouble of importing it first!