Hi,
Gregory Stark wrote:
>> The naming 'bidx' seems a bit weired to me, but otherwise I'm also optimistic
>> about it.
>
> If we wanted to put that in core
Uh.. ATM it's just a patch against contrib. I don't think 'bidx' needs
to go into core. Otherwise we'd have to move the whole intarr contrib
module as well, no?
> it would make more sense to have a flag on
> the array indicating whether it's sorted or not which is maintained whenever
> we construct or alter an array. Then just have the regular _int_contains()
> (which is an operator @>) take advantage of it if it's set and the data type
> is fixed-size.
Yeah, that sounds like a good thing. Currently, the intarr module
doesn't provide the optimized functions for the outside world
(_int_inter_inner() and such.. the _inner appendix really means "inside
intarr module only). I've ended up copy'n'pasting that code into my own
module, where I take care about ordering myself. But still want to
maintain the optimization.
However, that's probably not within the scope of this patch.
Regards
Markus Wanner