Utilize 23505 error code when doing insert_update() for postgresql