Re: patch: array_ndims

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: patch: array_ndims
Date: 2008-11-04 14:50:42
Message-ID: 49106142.9010708@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-11-04 14:57:56 Re: Enable pl/python to return records based on multiple OUT params
Previous Message Dmitry Turin 2008-11-04 14:47:55 Re: SQL5 budget