Re: patch: array_ndims - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: patch: array_ndims
Date
Msg-id 49106142.9010708@gmx.net
Whole thread Raw
In response to patch: array_ndims  ("Robert Haas" <robertmhaas@gmail.com>)
List pgsql-hackers
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_subscripts function provides most of what is needed -
> however, you need to know the number of dimensions in the array, and
> it appears we don't have a function to provide that information, at
> least not in a straightforward fashion.  That seems like a pretty
> useful thing to have anyway, so here's a patch to add it.

I have committed your array_ndims function with the addition of a small 
regression test, and I changed the return type to integer because that 
is what the rest of the array functions use for dimension information as 
well.



pgsql-hackers by date:

Previous
From: Dmitry Turin
Date:
Subject: Re: SQL5 budget
Next
From: Tom Lane
Date:
Subject: Re: Enable pl/python to return records based on multiple OUT params