PostgreSQL/Array/array cat

Материал из SQL эксперт
Перейти к: навигация, поиск

array_cat(ARRAY[[1,2],[3,4]], ARRAY[5,6])

   <source lang="sql">

postgres=# SELECT array_cat(ARRAY[[1,2],[3,4]], ARRAY[5,6]);

     array_cat

{{1,2},{3,4},{5,6}}

(1 row) postgres=#

      </source>
   
  


array_cat(ARRAY[1,2], ARRAY[3,4])

   <source lang="sql">

postgres=# SELECT array_cat(ARRAY[1,2], ARRAY[3,4]);

array_cat

{1,2,3,4}

(1 row) postgres=#

      </source>
   
  


array_cat(ARRAY[5,6], ARRAY[[1,2],[3,4]])

   <source lang="sql">

postgres=# SELECT array_cat(ARRAY[5,6], ARRAY[[1,2],[3,4]]);

          array_cat

[0:2][1:2]={{5,6},{1,2},{3,4}}

(1 row) postgres=# postgres=#

      </source>