title: How to replace a value in array
body: <p>I have a data like below.</p>
  
  <pre><code>id              col1[]
  ---             ------
  1                {1,2,3}
  2                {3,4,5}
  </code></pre>
  
  <p>My question is how to use replace function in arrays.</p>
  
  <pre><code>select array_replace(col1, 1, 100) where id = 1;
  </code></pre>
  
  <p>but it gives an error like:</p>
  
  <pre><code>function array_replace(integer[], integer, integer) does not exist
  </code></pre>
  
  <p>can anyone suggest how to use it?</p>