X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 1CA2A52A77 for ; Mon, 7 Mar 2005 02:21:55 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 43979-08 for ; Mon, 7 Mar 2005 02:21:46 +0000 (GMT) Received: from mx5.net.nih.gov (mx5.net.nih.gov [165.112.130.36]) by svr1.postgresql.org (Postfix) with ESMTP id 0E73B5547E for ; Mon, 7 Mar 2005 02:21:45 +0000 (GMT) Received: from mx5.net.nih.gov (localhost [127.0.0.1]) by mx5.net.nih.gov (8.12.10/8.11.6) with ESMTP id j272LmC7019491 for ; Sun, 6 Mar 2005 21:21:49 -0500 Received: from WATSON (vpn-165-112-10-12.net.nih.gov [165.112.10.12]) by mx5.net.nih.gov (8.12.10/8.11.6) with SMTP id j272Ll8Z019484; Sun, 6 Mar 2005 21:21:48 -0500 Message-ID: <005b01c522bc$6a31ece0$1f6df345@WATSON> From: "Sean Davis" To: "bandeng" , References: <3817e22905030608544a2aac9a@mail.gmail.com> <20050306191055.GA8834@winnie.fuhr.org> <3817e22905030618091584b1d1@mail.gmail.com> Subject: Re: count array in postgresql Date: Sun, 6 Mar 2005 21:21:47 -0500 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.193 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200503/91 X-Sequence-Number: 20570 How about array_dims? It looks like you will still have to do a string split, but.... Sean ----- Original Message ----- From: "bandeng" To: Sent: Sunday, March 06, 2005 9:09 PM Subject: Re: [SQL] count array in postgresql > my Postgresql version is 7.4 > > I still cannot find count function in that reference. but I try to use > like this just checking the array value is null or not, it's work but > dunno it is the good way or not. > > for example, > vararray := {ab,cd,ef,gh} > > i := 1; > while vararray[i] is not null loop > i := i + 1; > end loop; > > raise info i; > > > > On Sun, 6 Mar 2005 12:10:55 -0700, Michael Fuhr wrote: >> On Sun, Mar 06, 2005 at 11:54:15PM +0700, bandeng wrote: >> >> > I need some help, I have created function with argument in array. >> > I already try to find array function in manual but failed. >> >> Maybe you're looking for "Array Functions and Operators" in the >> "Functions and Operators" chapter. You don't say what version of >> PostgreSQL you're using; here's a link to the 8.0 documentation: >> >> http://www.postgresql.org/docs/8.0/interactive/functions-array.html >> >> -- >> Michael Fuhr >> http://www.fuhr.org/~mfuhr/ >> > > > -- > Gutten Aben Sugeng Sonten, Jangane Kurang Santen > bandeng.................... > > ---------------------------(end of broadcast)--------------------------- > TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org >