how to get the size of array? - Mailing list pgsql-sql

From Emi Lu
Subject how to get the size of array?
Date
Msg-id 44172C37.90804@encs.concordia.ca
Whole thread Raw
Responses Re: how to get the size of array?
List 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 by date:

Previous
From: george young
Date:
Subject: Re: Copying a row within table
Next
From: Andreas Kretschmer
Date:
Subject: Re: how to get the size of array?