In PostgreSQL we can use the array_replace()
function to replace a specified element (or elements) in an array with another element.
The first argument is the array, the second is the element to replace, and the third is the element to replace it with.
Continue reading