Re: Patch: propose to include 3 new functions into intarray and intagg - Mailing list pgsql-hackers

From Markus Wanner
Subject Re: Patch: propose to include 3 new functions into intarray and intagg
Date
Msg-id 48C1278C.2020504@bluegap.ch
Whole thread Raw
In response to Re: Patch: propose to include 3 new functions into intarray and intagg  (Gregory Stark <stark@enterprisedb.com>)
List pgsql-hackers
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




pgsql-hackers by date:

Previous
From: Gregory Stark
Date:
Subject: Re: Patch: propose to include 3 new functions into intarray and intagg
Next
From: "Marko Kreen"
Date:
Subject: Withdraw PL/Proxy from commitfest