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

a.furieri at lqt.it a.furieri at lqt.it
Mon Jan 26 10:48:52 PST 2015


On Mon, 26 Jan 2015 18:47:25 +0100, Even Rouault wrote:
> 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 Even,

I fully agree with the intended scopes of this RFC

using more or less at random single or double quotes in SQL expression
is a very common bad practice adopted by too many users.

many DBMS implementations do actually attempt to be reasonably tolerant
about mismatching usages and will successfully work even while parsing
malformed expressions without raising even the blandest warning.
anyway such an "users friendly" forgiveness will simply end up in an
increased confusion and will often impair real interoperability between
different SQL implementations.

always enforcing the standard SQL rules seems to be the most obvious
and safest approach for a tool like GDAL/OGR intended to support an
homogeneous abstraction level ideally supporting any possible SQL DBMS
implementation.

single quotes: string/text literals
double quotes: table and column names

bye Sandro


More information about the gdal-dev mailing list