Sounds like 1.8 and my reading the docs more carefully :) would solve my problems.

Thanks for the info Even I really appreciate it!
Even Rouault wrote:

Le samedi 15 octobre 2011 00:51:01, David J. Bakeman a écrit :

> Thanks Even and everyone else who responded! It was the fact that I had

> created the tables without registering the geometry column. I did that

> and now things appear good to go! That is ogrinfo is successful and

> lists the three tables with geometry.

>

> Perhaps the normal user of ogr is aware that only geometry columns are

> listed

In http://gdal.org/ogr/drv_pg.html,

"""If the geometry_columns table exists (i.e. PostGIS is enabled for the accessed database), then all tables and named views listed in the geometry_columns table will be treated as OGR layers."""

I read the first part but not the second and didn't know what it meant to register my geometry until you mentioned it.  I need to read the postgis docs better too :<;

> and you get a FAILURE otherwise but perhaps an empty list would

> be better? So I would have gotten:

> INFO: Open of `PG:dbname=mydb'

> using driver `PostgreSQL' successful.

>

> Instead of the FAILURE. I know the structure of the software might not

> make this possible so maybe a Note in the driver page for PostgreSQL?

Actually, the change to just return an empty list has been introduced in GDAL 1.8.0

From the 1.8.0 NEWS :

"""

PostgreSQL driver:

[...]

* Don't require to have found a layer in readonly mode to succeed in opening

the datasource.

"""

Perfect.

_______________________________________________
gdal-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to