Re: arrays as pgsql function parameters

From: Joseph Syjuco <joseph(at)asti(dot)dost(dot)gov(dot)ph>
To: Josh Berkus <josh(at)agliodbs(dot)com>
Cc: Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: arrays as pgsql function parameters
Date: 2002-06-10 13:51:18
Message-ID: 3D04AED6.338B45E0@asti.dost.gov.ph
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

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';

In response to

Browse pgsql-general by date

  From Date Subject
Next Message molinet 2002-06-10 13:52:39 create index rtree
Previous Message molinet 2002-06-10 13:51:10 error on index - HELP

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2002-06-10 13:56:27 Re: Efficient DELETE Strategies
Previous Message Christoph Haller 2002-06-10 13:42:10 Efficient DELETE Strategies