[gdal-dev] Call for discusson on RFC 52 Strict OGR SQL quoting

Even Rouault even.rouault at spatialys.com
Mon Jan 26 12:57:15 PST 2015


Le lundi 26 janvier 2015 21:49:21, Jukka Rahkonen a écrit :
> Even Rouault <even.rouault <at> spatialys.com> writes:
> > Hi,
> > 
> > This is a call for discussion on the new "RFC 52 - Strict OGR SQL
> > quoting", based on an older ticket.
> > 
> > http://trac.osgeo.org/gdal/wiki/rfc52_strict_sql_quoting
> > 
> > Summary :
> > 
> > This RFC proposes that OGR SQL enforces strict quoting rules for SQL
> > literals and identifiers.
> 
> Hi,
> 
> Could there be a need to think about the "schema"."table" structure? I have
> some memories about (silly) users having table names with dots like
> "MY.TABLE". If I remember right, with some database the SQL query
> 
> SELECT "field" FROM "MY.TABLE"
> 
> was being interpreted wrongly as "select field named 'field' from table
> named 'table' from schema named 'my'".
> 
> I do not really know if this trouble belongs to GDAL at all but I share my
> weigh memories anyhow.

There's no direct relevance with GDAL as we don't have the concept of schema 
in the abstraction, so "my.schema" is really "my.schema" if a layer has this 
name.

The closest thing we have is being able to do joins with other datasources as 
the main one :

SELECT * FROM city 
  LEFT JOIN '/usr2/data/nation.dbf'.nation ON city.nation_id = 
nation.nation_id

This is non standard SQL. Looking at my old patch in 
http://trac.osgeo.org/gdal/attachment/ticket/4280/ticket_4280.patch, it seems 
that this will still be permitted, as well as using double quotes.


> 
> -Jukka Rahkonen-
> 
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list