I'm unable to reproduce any of this, though admittedly I'm not on a 9.5 install, but on a "9.6" (aka git master) install.
pramsey=# select '-1'::integer; int4 ------ -1 (1 row) Crane:~/Sites/crackedtiles/pgsample pramsey(master)$ ogrinfo -q PG:"dbname=gis" 1: continent (Multi Polygon) So, keep on investigating... P On Tue, Oct 27, 2015 at 2:49 AM, Chris Hill <[email protected]> wrote: > 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" > > FAILURE: > 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. > > Chris > > -- 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" > LIBXML="2.7.8" LIBJSON="0.12" TOPOLOGY RASTER > > GDAL 1.11.3, released 2015/09/16 > > _______________________________________________ > postgis-users mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/postgis-users _______________________________________________ postgis-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/postgis-users
