how to get the size of array?

Поиск
Список
Период
Сортировка
От Emi Lu
Тема how to get the size of array?
Дата
Msg-id 44172C37.90804@encs.concordia.ca
обсуждение исходный текст
Ответы Re: how to get the size of array?  (Andreas Kretschmer <akretschmer@spamfence.net>)
Список pgsql-sql
Hello,

Is there a way that I can get the size of one array ?

For example, create table test (id varchar[]);
insert into test values('{}');
insert into test values('{1, 2, 3}');

I am looking for something like :  select sizeOf(id) as size from test;


so that I can get results like:
size
-------
0
3

Thanks a lot,
Ying



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

Предыдущее
От: george young
Дата:
Сообщение: Re: Copying a row within table
Следующее
От: Andreas Kretschmer
Дата:
Сообщение: Re: how to get the size of array?