It's doing exactly what you told it to.

>> update tmpArray set val[3] = 7;
>> UPDATE 3
>> select * from tmpArray;
>> id|val
>> --+---------
>>  1|{1,2,7,4}
>>  2|{1,2,7,4}
>>  3|{1,2,7,4}
>> (3 rows)

You didn't specify which rows to update, so it updates all.  Try:

update tmpArray set val[3] = 7 where id = 2;

This should only update one row.

MikeA

Sat, 6 Nov 1999 22:33:48 +0200 
"Ansley, Michael" <Michael.Ansley@intec.co.za>
RE: [HACKERS] Arrays broken on temp tables