Possible to UPDATE array[] columns? - Mailing list pgsql-general

From Blake Starkenburg
Subject Possible to UPDATE array[] columns?
Date
Msg-id IFEKLFOMIHMILPPMMCFECEFFKHAA.blake@oldride.com
Whole thread Raw
Responses Re: Possible to UPDATE array[] columns?
Re: Possible to UPDATE array[] columns?
Re: Possible to UPDATE array[] columns?
Re: Possible to UPDATE array[] columns?
List pgsql-general
Using SQL is it possible to UPDATE (append) onto an array[] column. For
example say I have a column named "scores int[]".

ID  | scores
2   | {54,14,21,8}
3   | {12,0,7}

Now I want to append the score of 12 on row:ID 2 so the new scores would
read {54,14,21,8,12}. I thought maybe simply leaving the array key empty
would auto-append "UPDATE table set scores[] = 12 WHERE id = 2", not so....

Thanks!


pgsql-general by date:

Previous
From: Thomas Kellerer
Date:
Subject: Re: Correlated Subquery and calculated column non-functional
Next
From: Thom Brown
Date:
Subject: Re: Possible to UPDATE array[] columns?