X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id AB6489DCCE9 for ; Tue, 14 Mar 2006 16:48:58 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 13554-10 for ; Tue, 14 Mar 2006 16:48:59 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from perseverance.encs.concordia.ca (perseverance-96.encs.concordia.ca [132.205.96.94]) by postgresql.org (Postfix) with ESMTP id 581179DCCA7 for ; Tue, 14 Mar 2006 16:48:55 -0400 (AST) Received: from [132.205.47.205] (IDENT:emilu@curacao.encs.concordia.ca [132.205.47.205]) by perseverance.encs.concordia.ca (8.12.11/8.12.11) with ESMTP id k2EKmuDd027271 for ; Tue, 14 Mar 2006 15:48:56 -0500 Message-ID: <44172C37.90804@encs.concordia.ca> Date: Tue, 14 Mar 2006 15:48:55 -0500 From: Emi Lu Reply-To: emilu@encs.concordia.ca User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-sql@postgresql.org Subject: how to get the size of array? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.43 on perseverance.encs.concordia.ca at 2006/03/14 15:48:56 EST X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.138 required=5 tests=[AWL=0.138] X-Spam-Score: 0.138 X-Spam-Level: X-Archive-Number: 200603/221 X-Sequence-Number: 24567 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