<div dir="ltr"><div>Hi folks,</div><div><br></div><div>I'm exploring Postgres 9.5 beta with PostGIS 2.20 (full versions listed below) on Windows 7 64 bit. All works as expected except for OGR which fails when attempting to access a PostGIS enabled database (but works for non-PostGIS databases).</div><div><br></div><div>This command succeeds with Postgres 9.4 and PostGIS 2.1.7:</div><div><br></div><div><font face="monospace, monospace"><b>C:\>ogrinfo -q PG:"dbname=postgis user=postgres port=5436"</b></font></div><div><br></div><div>Whereas this fails on a new installation of Postgres 9.5 and PostGIS 2.2.0:</div><div><br></div><div><font face="monospace, monospace"><b>C:\>ogrinfo -q PG:"dbname=postgis user=postgres port=5437"</b></font></div><div><font face="monospace, monospace"><b>ERROR 1: ERROR:  invalid input syntax for integer: "'-1'::integer"</b></font></div><div><font face="monospace, monospace"><b><br></b></font></div><div><font face="monospace, monospace"><b>ERROR 1: ERROR:  invalid input syntax for integer: "'-1'::integer"</b></font></div><div><font face="monospace, monospace"><b><br></b></font></div><div><font face="monospace, monospace"><b>FAILURE:</b></font></div><div><font face="monospace, monospace"><b>Unable to open datasource `PG:dbname=postgis user=postgres port=5437' with the following drivers.</b></font></div><div><font face="monospace, monospace"><b>  -> FileGDB</b></font></div><div><font face="monospace, monospace"><b>  -> ESRI Shapefile</b></font></div><div><font face="monospace, monospace"><b> [...]</b></font></div><div><font face="monospace, monospace"><b>  -> PostgreSQL</b></font></div><div><font face="monospace, monospace"><b> [...]</b></font></div><div> </div><div>As does any call to ogr2ogr. Yet this command succeeds:</div><div><br></div><div><font face="monospace, monospace"><b>C:\>ogrinfo --config PG_LIST_ALL_TABLES YES PG:"dbname=postgis user=postgres port=5437"</b></font></div><div><font face="monospace, monospace"><b>INFO: Open of `PG:dbname=postgis user=postgres port=5437'</b></font></div><div><font face="monospace, monospace"><b>      using driver `PostgreSQL' successful.</b></font></div><div><font face="monospace, monospace"><b>1: tiger.loader_variables (None)</b></font></div><div><font face="monospace, monospace"><b>2: tiger.loader_lookuptables (None)</b></font></div><div><font face="monospace, monospace"><b>3: raster_columns</b></font></div><div><font face="monospace, monospace"><b>[...]</b></font></div><div><br></div><div>This page <a href="http://www.gdal.org/drv_pg.html">http://www.gdal.org/drv_pg.html</a> (see FAQs at the bottom) suggests that permissions on geometry_columns and/or spatial_ref_sys tables are the likely culprits, yet these tables appear to have full permissions granted for user postgres.</div><div><br></div><div>Can anyone suggest a solution?</div><div><br></div><div>Many thanks for any assistance.</div><div><br></div><div>Chris</div><div><br></div><div>-- Versions:</div><div>PostgreSQL 9.5beta1, compiled by Visual C++ build 1800, 64-bit</div><div><br></div><div>POSTGIS="2.2.0 r14208" GEOS="3.5.0-CAPI-1.9.0 r4090" SFCGAL="1.2.0" PROJ="Rel. 4.9.1, 04 March 2015" GDAL="GDAL 2.0.1, released 2015/09/15" LIBXML="2.7.8" LIBJSON="0.12" TOPOLOGY RASTER</div><div><br></div><div>GDAL 1.11.3, released 2015/09/16</div></div>