[postgis-users] PostgreSQL 9.5 beta/PostGIS 2.2.0 fails with OGR

Chris Hill chill at confusedsea.co.uk
Tue Oct 27 02:49:12 PDT 2015

Hi folks,

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).

This command succeeds with Postgres 9.4 and PostGIS 2.1.7:

*C:\>ogrinfo -q PG:"dbname=postgis user=postgres port=5436"*

Whereas this fails on a new installation of Postgres 9.5 and PostGIS 2.2.0:

*C:\>ogrinfo -q PG:"dbname=postgis user=postgres port=5437"*
*ERROR 1: ERROR:  invalid input syntax for integer: "'-1'::integer"*

*ERROR 1: ERROR:  invalid input syntax for integer: "'-1'::integer"*

*Unable to open datasource `PG:dbname=postgis user=postgres port=5437' with
the following drivers.*
*  -> FileGDB*
*  -> ESRI Shapefile*
* [...]*
*  -> PostgreSQL*
* [...]*

As does any call to ogr2ogr. Yet this command succeeds:

*C:\>ogrinfo --config PG_LIST_ALL_TABLES YES PG:"dbname=postgis
user=postgres port=5437"*
*INFO: Open of `PG:dbname=postgis user=postgres port=5437'*
*      using driver `PostgreSQL' successful.*
*1: tiger.loader_variables (None)*
*2: tiger.loader_lookuptables (None)*
*3: raster_columns*

This page http://www.gdal.org/drv_pg.html (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.

Can anyone suggest a solution?

Many thanks for any assistance.


-- Versions:
PostgreSQL 9.5beta1, compiled by Visual C++ build 1800, 64-bit

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"

GDAL 1.11.3, released 2015/09/16
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20151027/7e186a8c/attachment.html>

More information about the postgis-users mailing list