I have finally resolved this issue by upgrading to 8.3.6 and then dropping and recreating the relevant GIST geometry index.
Could this be a manifestation of the GIST bug fixed in 8.3.6? Cheers, Stephen On Saturday 14 February 2009 13:55:08 Stephen Davies wrote: > Further to my earlier question. > > I have experimented further and now get the following results: > > benparts=# SELECT * from swip3 WHERE (pid in (select probe.id from probe > where logger_id in (select id from logger where client_id=120)) and > rdate='2009-02-12 13:30:00') and (geom && > setSRID( 'BOX3D(138.5356633 -34.99,138.5397151 -34.8)'::BOX3D,4283) ); > id | zname | pid | geom | rdate > ----+-------+-----+------+------- > (0 rows) > > benparts=# SELECT * from swip3 WHERE (pid in (select probe.id from probe > where logger_id in (select id from logger where client_id=120)) and > rdate='2009-02-12 13:30:00') and (geom && > setSRID( 'BOX3D(138.5 -34.99,138.6 -34.9)'::BOX3D,4283) ); > id | zname | pid | geom | > rdate > ----+--------+-----+----------------------------------------------------+-- >------------------- 28 | Zone 2 | 607 | > 0101000020BB1000007ADFF8DA335161406551D845D17541C0 | 2009-02-12 13:30:00 > (1 row) > > benparts=# SELECT astext(geom) from swip3 WHERE (pid in (select probe.id > from probe where logger_id in (select id from logger where client_id=120)) > and rdate='2009-02-12 13:30:00'); > astext > ----------------------------- > POINT(138.53758 -34.920449) > (1 row) > > The only thing that changes between query 1 and query 2 is that I have > increased the "extent constraint". > However, as query 3 shows, the point is clearly within the smaller original > extent so should have been returned by query 1. > > No??? > > Cheers, > Stephen -- ============================================================================= Stephen Davies Consulting P/L Voice: 08-8177 1595 Adelaide, South Australia. Fax : 08-8177 0133 Computing & Network solutions. Mobile:040 304 0583 VoIP:sip:1132...@sip1.bbpglobal.com _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users