[postgis-devel] [PostGIS] #950: Topology: LayerTrigger - wrong filter
PostGIS
trac at osgeo.org
Mon May 16 06:39:07 PDT 2011
#950: Topology: LayerTrigger - wrong filter
-----------------------+----------------------------------------------------
Reporter: aperi2007 | Owner: strk
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.0.0
Component: topology | Version: trunk
Keywords: |
-----------------------+----------------------------------------------------
Hi,
The LayerTrigger function in topology section actually use this code sql:
{{{
query = 'SELECT * '
|| ' FROM ' || quote_ident(toponame)
|| '.relation '
|| ' WHERE topogeo_id = ' || OLD.topology_id
|| ' AND layer_id = '|| OLD.layer_id
|| ' LIMIT 1';
--RAISE NOTICE '%', query;
}}}
I guess the comparing between topogeo_id and topology_id is wrong.
This could be allow/deny wrongly the deleting of some Layer.
Also I guess the correct sql should be this:
{{{
query = 'SELECT * '
|| ' FROM ' || quote_ident(toponame)
|| '.relation '
|| ' WHERE layer_id = '|| OLD.layer_id
|| ' LIMIT 1';
}}}
Because the topology is already the one when triggering this function.
regards,
Andrea.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/950>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-devel
mailing list