[#1410] Add support for the Postgres "DISTINCT ON" clause