For the record, if I create a postgres table 0, I need to double-quote it when issuing a SQL query, like :
ogrinfo pg:dbname=autotest -sql 'select * from "0"' and mysql needs also quoting, but they use reverse slash ` character instead of double-quote. So the new syntax isn't something that strange. I have no strong opinion if we should relax the restriction to the previous behaviour or not. Le mercredi 15 septembre 2010 03:00:15, Frank Warmerdam a écrit : > Smith, Michael ERDC-CRREL-NH wrote: > > Frank, > > > > I was testing accesing the OGR_STYLE value from a kmz file using the > > LIBKML driver. Previously this had worked. > > > > u4rt9...@maps:/htdocs/dhs/marine$ ogr2ogr -f OCI > > oci:"user/p...@tns:marinetest MarineTraffic.kmz -nln MArineTest3 -lco > > dim=2 -lco srid-8265 -lco launder=yes -lco precision=no -sql "select *, > > ogr_style from 0" > > OGR: OGROpen(MarineTraffic.kmz/0x13bb63a0) succeeded as LIBKML. > > ERROR 1: SQL Expression Parsing Error: syntax error > > Mike, > > The problem seems to be the table named 0 rather than the ogr_style > portion. Currently well formed identifiers must start with a letter or > an underscore, not a numeric digit. You can however quote it. > > So 'select *, ogr_style from "0"' should work. > > This is definitely a backward compatability issue, but it isn't clear to me > whether I ought to try and change it or not. Thoughts welcome. > > Best regards, _______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/gdal-dev