Description
Currently, the order of nulls is affected by the sort order (asc and desc), but should not. Here is the example of pgsql's behaviour.
postgres=# select * from test; id | name ----+------- 0 | test1 1 | | test2 (3 rows) postgres=# select * from test order by id asc nulls first; id | name ----+------- | test2 0 | test1 1 | (3 rows) postgres=# select * from test order by id desc nulls first; id | name ----+------- | test2 1 | 0 | test1 (3 rows)