Closed bowguy closed 3 years ago
Check your ogrinfo. This is a GDAL problem, not a ogr_fdw problem. Your GDAL just probably doesn't have pg support built.
Thanks @robe2 is postgresql support not included in the windows build of GDAL for PostGIS?
Just for future reference for anyone who looks at this ticket. The OGR_FDW driver packaged in PostGIS windows bundle does not include PostgreSQL support. This is intentional to prevent any possible conflict with the libpq.dll distributed by EDB which I can't control.
That said -- for PostGIS / PostGIS connection postgres_fdw is a much better option than ogr_fdw since postgres_fdw push down for joins, filters, and aggregates is much better than can be ever provided via GDAL/OGR_FDW.
Good advice all around 👍
Using the example in the documentation, I tried:
CREATE SERVER wraparound FOREIGN DATA WRAPPER ogr_fdw OPTIONS ( datasource 'PG:dbname=foo user=postgres', format 'PostgreSQL' );
but it returned:
ERROR: unable to find format "PostgreSQL" HINT: See the formats list at http://www.gdal.org/ogr_formats.html SQL state: HV00N
Then tried:
select * from ogr_fdw_drivers()
But PostgreSQL is not in the list.
PG 12, Windows 10, ogr_fdw_version():
OGR_FDW="1.1" GDAL="2.4.4"
Thanks