[postgis-devel] Support Functions

Sandro Santilli strk at kbt.io
Sun Mar 3 00:47:38 PST 2019


On Fri, Mar 01, 2019 at 01:29:56PM -0800, Paul Ramsey wrote:
> This PR is getting closer, but there’s still some outstanding stuff…
> 
> https://github.com/postgis/postgis/pull/378 <https://github.com/postgis/postgis/pull/378>
> 
> * In order to pass regression I had to change a number of references to _ST_Function to the new ST_Function, in places in raster and topology where there were direct calls to those signatures. Shouldn’t make any difference as the “index aware” calls only use indexes when they exist and make sense 

I was thinking about this tonight...
By enforcing use of an index are we reducing flexibility ?
IIRC in the topology code we call _ST_Function specifically to _avoid_
the bounding box check. Just because we already know the inputs
overlap, so we want to save some cycles.

I guess your new code won't do any bbox check but rather hint the
optimizer so when the optimizer is not involved (direct call on two
inputs?) there won't be any slowdown ?

But still, what happens when there are multiple indices defined on
tables ? Say GiST and BRIN... Is the new code going to enforce use
of one over the other ?

> * Most problematically, even when the _ST_Function calls are removed, topology fails regression, with what appear to be actual differences in behaviour. It’s not clear to me why my changes would have caused behaviour changes. Unfortunately it’s really hard to figure out what precise geometry combinations are being exercised in the topology tests.

My wild guess would be about change in default ordering, which
is likely not always enforced by topology code. Which test is
failing ?

--strk;


More information about the postgis-devel mailing list