[postgis-devel] a slight error in postgis TopologySummary

Sandro Santilli strk at keybit.net
Thu Sep 26 07:24:51 PDT 2013


Still, I don't really see the problem you're referring too.
Maybe you're confused by layer identifiers having holes
(which isn't a bug)

--strk;

On Thu, Sep 26, 2013 at 03:59:37PM +0200, Sandro Santilli wrote:
> On Thu, Sep 26, 2013 at 03:29:36PM +0200, RĂ©mi Cura wrote:
> > Hello strk,
> > 
> > I'm not using the latest yet :
> > POSTGIS="2.0.3 r11128" GEOS="3.4.0dev-CAPI-1.8.0 r3857" PROJ="Rel. 4.8.0, 6
> > March 2012" GDAL="GDAL 1.10.0, released 2013/04/24" LIBXML="2.8.0" TOPOLOGY
> > RASTER
> > 
> > 
> > Quick fix : a minor change in design : was querying the wrong table.
> > On my version it's around lines 68-70 in the function definition.
> > 
> > Old version :
> > "EXECUTE 'SELECT count(*) FROM (SELECT DISTINCT layer_id FROM '
> >       || quote_ident(atopology) || '.relation ) foo ' INTO STRICT n;
> > 
> > New version :
> >  "EXECUTE 'SELECT count(*) FROM (SELECT DISTINCT layer_id FROM
> > topology.layer
> >  WHERE schema_name = '|| quote_literal(atopology) || ') foo ' INTO STRICT
> > n;"
> 
> You're confusing layer _deploy_ schema_name with schema containing 
> the topological primitives. The correct query could be:
> 
>     EXECUTE 'SELECT count(layer_id) FROM topology.layer WHERE topology_id = '
>       || rec.id INTO STRICT n;
> 
> Can you give that a try ?
> 
> --strk;



More information about the postgis-devel mailing list