assigning values to array elements

Поиск
Список
Период
Сортировка
От J Greenbaum
Тема assigning values to array elements
Дата
Msg-id Pine.A41.4.10.10301131523550.206436-100000@acsrs1.bu.edu
обсуждение исходный текст
Ответы Re: assigning values to array elements
Список pgsql-sql
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

P.S. My apologies for posting this to 2 lists!



В списке pgsql-sql по дате отправления:

Предыдущее
От: "Chris Travers"
Дата:
Сообщение: Re: PgSQL 7.3: /opt/pgsql/bin/postgres: Execute permission denied.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: assigning values to array elements