In PotgreSQL, how do I write a query to replace some values in an int4 array?
{1,2,10} -> {1,2,999}
{2,3,10} -> {2,3,999}
is what we are aiming for.
Advertisement
Answer
Seems like you want to replace 10 with 999, you can use array_replace
array_replace(your_column, 10, 999)