There is a table:
CREATE TABLE "DATA" ( date timestamp without time zone, array_values int[] ); It contains data:
INSERT INTO "DATA" (date, array_values ) VALUES ('2017-01-19 00:00:00',ARRAY[1,2,3]); INSERT INTO "DATA" (date, array_values ) VALUES ('2017-01-19 00:00:00',ARRAY[4,5,6]); INSERT INTO "DATA" (date, array_values ) VALUES ('2017-01-19 00:00:00',ARRAY[7,8]); INSERT INTO "DATA" (date, array_values ) VALUES ('2017-01-19 01:01:01',ARRAY[100,102]); INSERT INTO "DATA" (date, array_values ) VALUES ('2017-01-19 01:01:01',ARRAY[103,104,105,106]); How to update the table, so that the arrays with the same dates were combined into one?
"2017-01-19 00:00:00" | {1,2,3,4,5,6,7,8}
"2017-01-19 01:01:01" | {101,102,103,104,105,106}