title: How can I add the array to the array of arrays in SQL (Postgres)
body: <p>I have a table with an attribute that is an array of arrays.</p>
  
  <p>Example: <code>a={{1,A, 1},{A,B,C},{45,46,47}}</code> </p>
  
  <p>I want to add an array to the array "a".</p>
  
  <p>Example: <code>new_array={Z,T}</code> to "a" in order to have <code>a={{Z,T},{1,A, 1},{A,B,C},{45,46,47}}</code> `</p>
  
  <p>I used the command: <code>update test set a = ARRAY['Z','T'] || a</code>;</p>
  
  <p>but I got this error: No operator matches the given name and argument type(s). You might need to add explicit type casts.</p>
  
  <p>So, I tried to add the <code>::text[]</code> parameter in this way:
  <code>update test set a = ARRAY['Z','T']::text[] || a::text[];
  </code>
  but there is still an error: </p>
  
  <pre><code>ERROR:  cannot concatenate incompatible arrays
  DETAIL:  Arrays with differing dimensions are not compatible for concatenation.
  </code></pre>
  
  <p>Hence, my question is: how can I add the array to the array of arrays?
  .</p>