RE: [HACKERS] Arrays broken on temp tables

From: "Ansley, Michael" <Michael(dot)Ansley(at)intec(dot)co(dot)za>
To: "'Kristofer Munn '" <kmunn(at)munn(dot)com>, "'pgsql-hackers(at)postgreSQL(dot)org '" <pgsql-hackers(at)postgreSQL(dot)org>
Subject: RE: [HACKERS] Arrays broken on temp tables
Date: 1999-11-06 20:33:48
Message-ID: 1BF7C7482189D211B03F00805F8527F748C223@S-NATH-EXCH2
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-hackers by date

  From Date Subject
Next Message Keith Parks 1999-11-06 20:38:11 New psql compile problem.
Previous Message Kristofer Munn 1999-11-06 20:09:54 Arrays broken on temp tables