Re: [SQL] Error when using array variable

2005-07-22 Thread Tom Lane
Michael Fuhr <[EMAIL PROTECTED]> writes: > On Fri, Jul 22, 2005 at 03:07:04PM +0530, Gnanavel S wrote: >> You need to initialse the array, Otherwise any value added to the array will >> be null. > This isn't necessary in 8.0, which we can infer is being used because > of the dollar quotes. Howeve

Re: [SQL] Error when using array variable

2005-07-22 Thread Michael Fuhr
On Fri, Jul 22, 2005 at 03:07:04PM +0530, Gnanavel S wrote: > On 7/22/05, Dongsoo Yoon <[EMAIL PROTECTED]> wrote: > > CREATE OR REPLACE FUNCTION arr_test() > > RETURNS NUMERIC[] AS $BODY$ > > DECLARE > > v_count NUMERIC default 0; > > v_dayIndex NUMERIC default 0; > > t_modifiedTimes NUMER

Re: [SQL] Error when using array variable

2005-07-22 Thread Gnanavel S
On 7/22/05, Dongsoo Yoon <[EMAIL PROTECTED]> wrote: I use a function using array variable as following.   The function returns array type.   When array variable is allocated with any value,allocating is not done.   I can't find why it is.   --

Re: [SQL] Error when using array variable

2005-07-22 Thread Michael Fuhr
On Fri, Jul 22, 2005 at 06:24:03PM +0900, Dongsoo Yoon wrote: > > When array variable is allocated with any value, > allocating is not done. It's not clear what this means -- what are you expecting to happen, and what actually is happening? > v_testval := t_modifiedTimes[v_dayIndex ] ;

[SQL] Error when using array variable

2005-07-22 Thread Dongsoo Yoon
I use a function using array variable as following.   The function returns array type.   When array variable is allocated with any value,allocating is not done.   I can't find why it is.   ---   CREATE OR REPLACE FUNCTION arr_tes

[SQL] Error when using array variable

2005-07-22 Thread Dongsoo Yoon
  I use a function using array variable as following.   The function returns array type.   When array variable is allocated with any value,allocating is not done.   I can't find why it is.   ---   CREATE OR REPLACE FUNCTION arr_