Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 4A7E6475980 for ; Sun, 9 Jun 2002 21:03:35 -0400 (EDT) Received: from kitana.asti.dost.gov.ph (kitana.asti.dost.gov.ph [202.90.128.8]) by postgresql.org (Postfix) with ESMTP id 09D74475981 for ; Sun, 9 Jun 2002 21:03:33 -0400 (EDT) Received: from asti.dost.gov.ph (askr.asti.dost.gov.ph [10.10.5.36]) by kitana.asti.dost.gov.ph (Postfix) with ESMTP id 8E7DA2584A; Mon, 10 Jun 2002 09:00:22 +0800 (PHT) Message-ID: <3D04AED6.338B45E0@asti.dost.gov.ph> Date: Mon, 10 Jun 2002 09:51:18 -0400 From: Joseph Syjuco Organization: Advanced Science and Technology Institute X-Mailer: Mozilla 4.78 [en] (X11; U; Linux 2.4.8-26mdk i586) X-Accept-Language: en MIME-Version: 1.0 To: Josh Berkus Cc: Achilleus Mantzios , pgsql-sql@postgresql.org Subject: Re: arrays as pgsql function parameters References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200206/101 X-Sequence-Number: 8066 Josh Berkus wrote: > > Joseph, > > > actually i already have and basically the function statments start as > > create function test(_int4) returns integer > > when i tried to execute the function > > select test('{1,2,3,4}'); > > it didnt spew out errors but it didnt output results either > > How about posting a full function definition? > > We're not telepathic. > > -Josh here is the sample function that i got from the internet. hope you can send me a sample function create function foo(_int4) returns int2 as' declare a _int4 alias for $1; i int:=1; begin while a[i] loop i:=i+1; end loop; return i-1; end; ' language 'plpgsql';