another question is how to solve more than one occurrence on one value - probably two sets of functions - first returns first occurrence of value, second returns set of occurrence
This wouldn't be so bad if we had an easier way to extract subsets of an array, but even that is really ugly because whatever you extract keeps the original number of dimensions.
Implementation is simple (plpgsql code)
This would actually be written in C though, yes? Otherwise it's not really any better than just doing an extension...
Sure, I expect a C implementation
Pavel
-- Jim Nasby, Data Architect, Blue Treble Consulting Data in Trouble? Get it in Treble! http://BlueTreble.com