is this query safe from sql injection or any type of security breaches?

if ($_POST['id'] > 0) {
  $_POST['id'] = (int) $_POST['id'];
  $query = "select id from table where id = ".$_POST['id'];
}

is my query here server-sided safe or requires more measures because it can be breached? the query is all about getting an integer from the post request?