<div dir="ltr">Hi,<br>I have a remote PostGIS database on, say host. I can connect to it using QGIS and display data (it actually comes up with "Database connection was successful but no accessible tables were found. Please verify that you have SELECT privilege on a table carrying POSTGIS geometry", but it displays all my geo-enabled tables and uses data without any problem). shp2pgsql also works, but I can't connect to said db using OGR.<br clear="all">
$ ogrinfo --debug on -ro 'PG:host=HOST user=USER password=PASSWORD port=5432 dbname=DBNAME'<br>OGR_PG: DBName="DBNAME"<br>OGR_PG: PostSIS version string: '1.3 USE_GEOS=1 USE_PROJ=1 USE_STATS=1' -> '1.3'<br>
OGR_PG: POSTGIS_VERSION=1.3 USE_GEOS=1 USE_PROJ=1 USE_STATS=1<br>OGR: OGROpen(PG:host=HOST user=USER password=PASSWORD port=5432 dbname=DBNAME) failed.<br>FAILURE:<br>Unable to open datasource `PG:host=HOST user=USER password=PASSWORD port=5432 dbname=DBNAME' with the following drivers.<br>
-> ESRI Shapefile<br> -> MapInfo File<br> -> UK .NTF<br> -> SDTS<br> -> TIGER<br> -> S57<br> -> DGN<br> -> VRT<br> -> REC<br> -> Memory<br> -> BNA<br> -> CSV<br> -> GML<br>
-> GPX<br> -> KML<br> -> GeoJSON<br> -> Interlis 1<br> -> Interlis 2<br> -> GMT<br> -> SQLite<br> -> ODBC<br> -> PGeo<br> -> OGDI<br> -> PostgreSQL<br> -> MySQL<br> -> AVCBin<br>
<br><br>Exactly the same values I issue on my ogrinfo call (or osgeo.ogr.Open( pg_connect ) using the Python wrappers) provide the QGIS connection that works as expected. psql also connects fine. OGR/GDAL version is <a href="http://1.5.1.">1.5.1.</a> <br>
<br>Does anyone have any clues on how to keep on debugging this? I am sort of lost on how to continue investigating this!<br><br><br>Thanks!<br>Jose<br>-- <br>Centre for Terrestrial Carbon Dynamics<br>Department of Geography, University College London<br>
Gower Street, London WC1E 6BT, UK<br>
</div>