RE: [HACKERS] Arrays broken on temp tables - Mailing list pgsql-hackers

From Ansley, Michael
Subject RE: [HACKERS] Arrays broken on temp tables
Date
Msg-id 1BF7C7482189D211B03F00805F8527F748C223@S-NATH-EXCH2
Whole thread Raw
List pgsql-hackers
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


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [HACKERS] pgsql quote bug, put in 6.5.4?
Next
From: Keith Parks
Date:
Subject: Re: [HACKERS] New psql compile problem.