assigning values to array elements

From: J Greenbaum <jj(at)bu(dot)edu>
To: pgsql-novice(at)postgresql(dot)org
Subject: assigning values to array elements
Date: 2003-01-13 20:14:40
Message-ID: Pine.A41.4.10.10301131511001.208168-100000@acsrs1.bu.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hello,

I'm fairly new to postgres and I'm trying to write a PL/pgsql function and
keep getting an error message. Here is the line that is giving me
trouble:

norm[i] := (NEW.area[i]/(A_slope * (i+18) + A_int)+NEW.area[i]/(C_slope *
(i+18) + C_int))/2;

The error message that I receive is: WARNING: plpgsql: ERROR during
compile of norm_n_scan near line 27 ERROR: parse error at or near "["

As you can see, I'm trying to assign a value to an array element, but it
isn't working for some reason. FYI, "norm" is declared as a floating
point array of unlimited size. Please let me know if you have any
suggestions. Thanks!!

-Jay Greenbaum

Browse pgsql-novice by date

  From Date Subject
Next Message Jeffrey Melloy 2003-01-13 20:24:59 Re: DESCRIBE eqivalent
Previous Message Kevin Waterson 2003-01-13 20:01:09 Re: Moving from MySQL