Arrays in Postgres are indexed starting at position 1, not 0. From the documentation :
By default, PostgreSQL uses a one-time numbering convention for arrays, that is, an array of n elements starts with array [1] and ends with array [n].
With this in mind, try the following query:
SELECT * FROM items ORDER BY aliases[1];
source
share