This code works for any table with an single integer pkey. I'm not assuming I've used the random-table generation code. I will change the assertion to accept all integer types.