>Moving the exclusion operation up a level seems to do the trick:
>
>testdb=# BEGIN ;
>BEGIN
>testdb=*# update tableA set f2 = (select array_agg(X.id) from (select f1, 
>unnest(f2) id from tablea where f1 = 1) x WHERE x.id != 101) where f1=1; 
>UPDATE 1 testdb=*# SELECT * from tablea ;
> f1 |           f2
>----+-------------------------
>  1 | {100,102,103,99,104,22}
> (1 row)
>
> (It's a bit late where  I am so I might be overlooking something)
>
>
>Ian Barwick

You're absolutely correct Ian.
(It's getting late here too ;) )

-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

Reply via email to