Update some delete queries for pg