[gdal-dev] OGR SQL and lother dialects?
Jürgen E. Fischer
jef at norbit.de
Fri Dec 4 08:04:12 PST 2015
Hi Even,
On Fri, 04. Dec 2015 at 14:29:47 +0100, Even Rouault wrote:
> Le vendredi 04 décembre 2015 14:08:40, Paolo Cavallini a écrit :
> > Hi all,
> > apparently the OGR SQL dialect is different from others:
> > https://hub.qgis.org/issues/7380
> > Any hope to bring them to common ground?
> I believe x = NULL is an extension of the SQL standard that may
> be supported or not by the various SQL engines.
> AFAIK, the SQL 92 standard only accepts the "x IS NULL" syntax.
> From my tests:
>
> - SQLite rejects "x = NULL" syntax.
Not here.
SELECT 1 WHERE ''=NULL
returns no rows in sqlite3 - consistent with what I found in PostgreSQL and
Oracle (add "FROM dual" there).
> - OGR SQL accepts it (does not error on it), but it's more in the
> unspecified behaviour category and apparently doesn't behave like x IS NULL.
> I guess this must be evaluated like x = '' internally.
That might have been the original behaviour which caused the problem - but it
seems to have changed.
I found that OGR SQL (if that's still the default dialect) now behaves like the
others in that regard and x=NULL is different from x IS NULL. I updated the
ticket accordingly.
Jürgen
--
Jürgen E. Fischer norBIT GmbH Tel. +49-4931-918175-31
Dipl.-Inf. (FH) Rheinstraße 13 Fax. +49-4931-918175-50
Software Engineer D-26506 Norden http://www.norbit.de
QGIS release manager (PSC) Germany IRC: jef on FreeNode
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 827 bytes
Desc: Digital signature
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20151204/321ed200/attachment.sig>
More information about the gdal-dev
mailing list