[Gdal-dev] Virtual Spatial connection to PostgreSQL ODBC driver

Jeff McKenna jmckenna at dmsolutions.ca
Wed Nov 29 14:06:16 EST 2006


I'm attempting to connect to X/Y data stored in a PostgreSQL table (no 
geometry) through OGR:ODBC, and getting the following errors:


ogrinfo ODBC:@mydsn xxx -summary
ERROR 1: No column definitions found for table 'sql_features', layer not 
usable.

ERROR 1: No column definitions found for table 
'sql_implementation_info', layer
not usable.
ERROR 1: No column definitions found for table 'sql_languages', layer 
not usable
.
ERROR 1: No column definitions found for table 'sql_packages', layer not 
usable.

ERROR 1: No column definitions found for table 'sql_sizing', layer not 
usable.
ERROR 1: No column definitions found for table 'sql_sizing_profiles', 
layer not
usable.
INFO: Open of `ODBC:@mydsn'
using driver `ODBC' successful.

Layer name: xxx
Geometry: Unknown (any)
Feature Count: 840
Layer SRS WKT:
(unknown)
nf: Integer (10.0)
pe: Integer (10.0)
ns: Integer (10.0)
nb: Integer (10.0)
qc: Integer (10.0)
on_: Integer (10.0)
...

So for some reason the ODBC:OGR connection cannot find the 
information_schema tables, even though they exist, shown here in psql:


                         List of relations
        Schema       |          Name           | Type  |  Owner
--------------------+-------------------------+-------+----------
  information_schema | sql_features            | table | postgres
  information_schema | sql_implementation_info | table | postgres
  information_schema | sql_languages           | table | postgres
  information_schema | sql_packages            | table | postgres
  information_schema | sql_sizing              | table | postgres
  information_schema | sql_sizing_profiles     | table | postgres
  public             | xxx                     | table | postgres

This becomes a show-stopper when trying to display the layer in MapServer:

   msDrawMap(): Image handling error. Failed to draw layer named 'xxx'. <br>
msOGRFileNextShape(): OGR error. No column definitions found for table 
'sql_sizi
ng_profiles', layer not usable. <br>

These same errors occur with GDAL 1.3.2 and CVS-head.  I'm connecting as 
the postgres user, which owns the information_schema tables and my x/y 
table.

Anyone see what I am doing wrong?

thanks.

jeff


-- 
Jeff McKenna
DM Solutions Group Inc.
http://www.dmsolutions.ca



More information about the Gdal-dev mailing list