Return one row with last version from postgres