Fixed: pgsql to make order