[gdal-dev] Motion: Adopt RFC 29: OGR Set Ignored Fields

Frank Warmerdam warmerdam at pobox.com
Mon Aug 9 09:32:14 EDT 2010


On Mon, Aug 9, 2010 at 2:19 AM, Peter J Halls <P.Halls at york.ac.uk> wrote:
> Please correct me if I am wrong, but is not the OGR SQL engine correct at
> present, ie conformant to the SQL standard, whilst this proposal would
> render OGR SQL non-conformant?
>
> For example,
>
> SELECT * FROM tablename WHERE condition
>
> is the most common case and is the form currently delivered by OGR;
>
> however,
>
> SELECT column2,column3,column7,columnn FROM tablename WHERE condition
>
> must be the second most common.  SQL provides for the specification of
> columns to return (* / all or a list) but does not, so far as I am aware,
> provide a construct by which one can specify columns to be omitted from the
> results (which, I suppose, would equate to * EXCEPT FOR).
>
> Surely the goal is compliance with the standards?

Peter,

RDBMS based providers will construct the list of
columns to select by scanining through the  OGR
field definitions, and including all those not marked
as excluded in the select statement.  The fact that
the high level API function excludes fields rather than
including them has no effect at the lower levels.  It
is just a way of ensuring that things are not excluded
by accident.

I see no problem.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent


More information about the gdal-dev mailing list