return the retrieve_ids (given with each appended row) for the list