Re: arrays as pgsql function parameters - Mailing list pgsql-sql

From Joseph Syjuco
Subject Re: arrays as pgsql function parameters
Date
Msg-id 3D04AED6.338B45E0@asti.dost.gov.ph
Whole thread Raw
In response to Re: arrays as pgsql function parameters  ("Josh Berkus" <josh@agliodbs.com>)
List 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';
 


pgsql-sql by date:

Previous
From: "Ian Cass"
Date:
Subject: Re: select failure
Next
From: Bradley Kieser
Date:
Subject: Rule to fill in value on column on insert