[postgis-devel] Prepared Geometry API
David Fuhry
dfuhry at acm.org
Mon Oct 6 10:51:13 PDT 2008
Paul Ramsey wrote:
>> E.g. the left side of intersects will most always come from the same set of
>> data
>> and the right side of intersects will come from some other dataset.
>>
>> When we pull it out of the PG_DATAUM array or whatever isn't that pulling it
>> out based on some generated pointer already. Why can't we just compare
>> these PG pointers and if they are the same its the same geometry.
>
> That would indeed be ideal. More information is needed, however :)
Theoretical counterexample: If postgres palloc()s for a geometry, then
pfree()s it, then palloc()s for the next geometry, and if the address
returned points to the same memory location as the previous palloc(),
then a pointer-caching technique would give a false positive.
Only if you could guarantee a unique memory location for each geometry
seen in the (sub)query would that work.
More information about the postgis-devel
mailing list