[gdal-dev] When and why ogrinfo sends update for Oracle?

Stefano Iacovella stefano.iacovella at gmail.com
Wed Aug 22 04:07:50 PDT 2012


2012/8/22 Jukka Rahkonen <jukka.rahkonen at mmmtike.fi>

> Hi,
>
> I learned to use ogrinfo with --debug on lately and it revealed what
> all happens after sending plain ogrinfo through OCI driver. A few
> lines interest me. What is the meaning to doing the select from
> ALL_SDO_GEOM_METADATA then insert into USER_SDO_GEOM_METADATA as
> follows?
>
> OCI: Prepare(select min(case when r=1 then sdo_lb else null end) minx,
> min(case when r=2 then sdo_lb else null end) miny, min(case when r=1
> then sdo_ub else null end) maxx, min(case when r=2 then sdo_ub else
> null end) maxy from (SELECT d.sdo_dimname, d.sdo_lb, sdo_ub,
> sdo_tolerance, rownum r FROM ALL_SDO_GEOM_METADATA m, table(m.diminfo)
> d where m.table_name = UPPER('TABLE') and m.COLUMN_NAME =
> UPPER('GEOM') ) )
>
> OCI: Prepare(UPDATE USER_SDO_GEOM_METADATA SET DIMINFO =
> MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X',2899987.997,4000000.003,
> 0.001),MDSYS.SDO_DIM_ELEMENT('Y',5999987.997,8000000.003,0.001)) WHERE
> TABLE_NAME = 'TABLE')
>
> I guess that meaning is to check all the metadata rows from the
> ALL_SDO_GEOM_METADATA view which are referring to the queried table.
> There can be several rows created be different Oracle users. Next the
> maximum BBOX is constructed and that is updated into
> USER_SDO_GEOM_METADATA view.
>
>
> It seems to me that first statement  should include an OWNER filter in the
WHERE clause, or it will fetch all records for table with same name and
same geometric filedname.

Regards

stefano
---------------------------------------------------
41.95581N 12.52854E


http://www.linkedin.com/in/stefanoiacovella

http://twitter.com/#!/Iacovellas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20120822/3f3e0afe/attachment.html>


More information about the gdal-dev mailing list