title: Filling the values of an array with values of other table
body: <p>I have a table (my_table2) in postgresql which contains a column with array type. I want values of column val1 of my_table1 to be first elements of my array (array_col) and val2 to be second elements of array_col. I came up with this query:</p>
  
  <pre><code>update my_table2
  set array_col=array[
      (
      select val1 from my_table1)
      , (select val2 from my_table1)
      ]
  </code></pre>
  
  <p>but I got an error when I run it: <br/>
  <em>ERROR:  more than one row returned by a subquery used as an expression</em>
  Is there a method to do it?</p>