Re: Arrays: determining size

Поиск
Список
Период
Сортировка
От SZUCS Gábor
Тема Re: Arrays: determining size
Дата
Msg-id 017601c29a33$5e894820$0a03a8c0@fejleszt2
обсуждение исходный текст
Ответ на Arrays: determining size  (Steve Crawford <scrawford@pinpointresearch.com>)
Ответы Re: Arrays: determining size  (Steve Crawford <scrawford@pinpointresearch.com>)
Список pgsql-general
Steve,

It worked for me in 7.2.1:

select *, array_dims(bar) from foo;
    bar    | array_dims
-----------+------------
 {1,2,3,4} | [1:4]
 {a,b,c}   | [1:3]
(2 rows)

I think it's two-dimensional; read more in arrays.html in the PostgreSQL
doc.

G.
--
while (!asleep()) sheep++;

---------------------------- cut here ------------------------------
----- Original Message -----
From: "Steve Crawford" <scrawford@pinpointresearch.com>
To: <pgsql-general@postgresql.org>
Sent: Monday, December 02, 2002 6:58 PM
Subject: [GENERAL] Arrays: determining size


> Given a variable length array data type in a table:
> create table foo (bar text[]);
>
> and some data:
> insert into foo values ('{"a","b","c"'});
> insert into foo values ('{"1","2","3","4"}');
>
> Is there a simple way to determe the size of each array?
>
> Cheers,
> Steve
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>


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

Предыдущее
От: Joel Burton
Дата:
Сообщение: Re: [SQL] CURRENT_TIMSTAMP
Следующее
От: "Nicolai Tufar"
Дата:
Сообщение: Re: timing queries?