Re: number of elements in a multidimensional array

Поиск
Список
Период
Сортировка
От David Fetter
Тема Re: number of elements in a multidimensional array
Дата
Msg-id 20060901184737.GR7270@fetter.org
обсуждение исходный текст
Ответ на number of elements in a multidimensional array  ("SunWuKung" <Balazs.Klein@t-online.hu>)
Список pgsql-general
On Thu, Aug 31, 2006 at 08:17:35AM -0700, SunWuKung wrote:
> From this array how could I get back the fact that this array
> consists of a two dimensional array with X elements?
>
> Select array_dims('{{1,4,10,11},{1,5,4,5}}'::text [])
>
> I would like to get back the number 4 here?

SELECT array_upper('{{1,4,10,11},{1,5,4,5}}'::TEXT[], 2);

Cheers,
D
--
David Fetter <david@fetter.org> http://fetter.org/
phone: +1 415 235 3778        AIM: dfetter666
                              Skype: davidfetter

Remember to vote!

В списке pgsql-general по дате отправления:

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: Thought provoking piece on NetBSD
Следующее
От: Anastasios Hatzis
Дата:
Сообщение: Re: Duplicating rows in one table but with one column value