Assign values to array

From: "afa" <afa(at)vivatech(dot)no>
To: pgsql-sql(at)postgresql(dot)org
Subject: Assign values to array
Date: 2002-06-19 20:45:25
Message-ID: 200206192039.g5JKd8q22527@server236a.web2wap.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


Hello

I have made this simple test function:

declare
t integer[3];
u integer;
begin
u:=t[1];
t[1]:=4;
return 0;
end;

This is the results when i execute it:

apollo3-stat=# select test();
NOTICE: plpgsql: ERROR during compile of test near line 6
ERROR: parse error at or near "["
apollo3-stat=#

This tells me that the assignment to u is ok.
How can i assign something to the t array?

I'm running versjon 7.2.1

afa

-------------------------------------------------------------------
-->> Add WEB ACCESS to your POP email accounts with
-->> FREE Perl CGI scripts! Download today! http://www.adjeweb.com
-------------------------------------------------------------------

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Michael Agbaglo 2002-06-19 21:13:31 Re: syntax for access an alias in the where clause ?
Previous Message Bruce Momjian 2002-06-19 20:34:49 Re: Which one is faster?