Re: [HACKERS] patch: array_ndims

2008-11-04 Thread Peter Eisentraut
Robert Haas wrote: After reading Josh Berkus's email suggesting that the intagg module be dropped, I was wondering what would be required to create a array enumerator (variously called unnest, unroll, array_enum, and, as contemplated by the TODO list, array_to_set). Pavel Stehule's generate_subs

Re: [HACKERS] patch: array_ndims

2008-10-11 Thread Pavel Stehule
2008/10/11 Robert Haas <[EMAIL PROTECTED]>: > There's nothing in that functionality that contemplates > multi-dimensional arrays. Since we have multi-dimensional arrays, > oughtn't we provide the basic functions to deal with them? > array_ndims has got to be at least as useful as array_dims (which

Re: [HACKERS] patch: array_ndims

2008-10-11 Thread Robert Haas
To put that another way, there are other potential uses of this function. For example, how would you suggest that someone do this? CREATE TABLE foo ( id serial, bar int[], CHECK (array_ndims(bar) = 3) ); You can hack something together, but it's not particularly nice. ...Robert On

Re: [HACKERS] patch: array_ndims

2008-10-11 Thread Robert Haas
There's nothing in that functionality that contemplates multi-dimensional arrays. Since we have multi-dimensional arrays, oughtn't we provide the basic functions to deal with them? array_ndims has got to be at least as useful as array_dims (which returns an difficult-to-parse chunk of text). ...R

Re: [HACKERS] patch: array_ndims

2008-10-10 Thread Pavel Stehule
Hello we talked about these features, but these functionality is solved with UNNEST operator http://farrago.sourceforge.net/design/CollectionTypes.html - so if you like this functionality (I believe, so want it), please implement UNNEST operator. Regards Pavel Stehule http://www.ibm.com/develope

[HACKERS] patch: array_ndims

2008-10-10 Thread Robert Haas
After reading Josh Berkus's email suggesting that the intagg module be dropped, I was wondering what would be required to create a array enumerator (variously called unnest, unroll, array_enum, and, as contemplated by the TODO list, array_to_set). Pavel Stehule's generate_subscripts function provi