pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedAssign values to array
2+ messages / 2 participants
[nested] [flat]
* Assign values to array
@ 1970-01-01 00:00 afa <afa@vivatech.no>
2002-06-20 14:56 ` Re: Assign values to array Arve Fahlvik <afa@vivatech.no>
0 siblings, 1 reply; 2+ messages in thread
From: afa @ 1970-01-01 00:00 UTC (permalink / raw)
To: 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
-------------------------------------------------------------------
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Assign values to array
1970-01-01 00:00 Assign values to array afa <afa@vivatech.no>
@ 2002-06-20 14:56 ` Arve Fahlvik <afa@vivatech.no>
0 siblings, 0 replies; 2+ messages in thread
From: Arve Fahlvik @ 2002-06-20 14:56 UTC (permalink / raw)
To: pgsql-sql
Thanks
I can see the logic now, but have still problems.
declare
t integer[3];
begin
t[1]:='{4}';
return 0;
end;
apollo3-stat=# select test();
NOTICE: plpgsql: ERROR during compile of test near line 4
ERROR: parse error at or near "["
apollo3-stat=#
Joseph Syjuco wrote:
> try out
> t[1]:='{4}'
> afa wrote:
>
>> 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
>> -------------------------------------------------------------------
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 3: if posting/reading through Usenet, please send an appropriate
>> subscribe-nomail command to majordomo@postgresql.org so that your
>> message can get through to the mailing list cleanly
>>
>
>
>
>
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2002-06-20 14:56 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1970-01-01 00:00 Assign values to array afa <afa@vivatech.no>
2002-06-20 14:56 ` Arve Fahlvik <afa@vivatech.no>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox