I realized that there are two ways to indicate arrays in a table in PostgreSQL but I cannot figure out what the difference is, or if either one has any advantages.
There seem to be two syntaxes:
- {a,b,c,d,e}
- [0:4]={a,b,c,d,e}
For example:
CREATE TABLE table1
(id serial, arrayspalte smallint[], dt timestamp)
;
INSERT INTO table1
(id, arrayspalte, dt)
VALUES
(330, '[0:4]={12,14,27,45,50}', '2007-09-30 10:39:52'),
(331, '{2, 6,100,200,500,1000}', '2007-09-30 10:41:52')
;
Which in the table then looks like this:

Both an array, but both look very different. It's clear that the former one shows the dimensions of the array, but is there any bigger difference between the two? And is it OK to have both kinds in the same table, or could that cause issues?