Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
ibnmajah:619Muḥammad b. al-Muṣaffá al-Ḥimṣī > Baqiyyah > Ḥabīb b. Ṣāliḥ > Abū Ḥa al-Muʾadhhin > Thawbān

The Messenger of Allah said: "No one among the Muslims should stand to pray when he is suppressing (the need to urinate or defecate), until he has to relieve himself."  

ابن ماجة:٦١٩حَدَّثَنَا مُحَمَّدُ بْنُ الْمُصَفَّى الْحِمْصِيُّ حَدَّثَنَا بَقِيَّةُ عَنْ حَبِيبِ بْنِ صَالِحٍ عَنْ أَبِي حَىٍّ الْمُؤَذِّنِ عَنْ ثَوْبَانَ

عَنْ رَسُولِ اللَّهِ ﷺ أَنَّهُ قَالَ لاَ يَقُومُ أَحَدٌ مِنَ الْمُسْلِمِينَ وَهُوَ حَاقِنٌ حَتَّى يَتَخَفَّفَ