Sayyiduna Ibn Abbas (may Allah be pleased with them both) says: None of you should pray while he is holding back urine and excrement.