MATTERS THAT ONE MAY NOT RULE ABOUT WHILE INTOXICATED [Hora'ah: drunk]
Gemara
One who drinks a Revi'is of wine may not give Hora'ah.
Sanhedrin 42a: "Ul'Roznim Ei Shechar" - those (on the Sanhedrin) engaging in the secrets of the world should not become intoxicated.
Kerisus 13b: Rav Acha of Hutzal came to Rav Ashi (on Yom Tov) to permit a vow
Rav Ashi: Go, and return tomorrow. Rav would not expound on Yom Tov (after drinking) until the next day, lest he be drunk. (Similarly, I do not permit vows on Yom Tov.)
(Beraisa): "U'Lehavdil Bein ha'Kodesh u'Vein ha'Chol" refers to vows to Hekdesh; "U'Vein ha'Tamei u'Vein ha'Tahor" refers to Teme'os and Taharos; "u'Lehoros" refers to Hora'ah (about Isur v'Heter);
"Es Kol ha'Chukim" is what is expounded; "Asher Diber Hash-m" are traditions from Moshe from Sinai; "b'Yad Moshe" is Talmud (which explains everything else.)
Suggestion: Perhaps also Mishnah (may not be taught while drunk)!
Rejection: "U'Lehoros" (one may not rule based on Mishnah alone).
R. Yosi b'Rebbi Yehudah says, one might have thought that even Talmud is forbidden while drunk. "U'Lehoros" teaches that this is not so.
Question: Who is the Tana of the following Beraisa?
(Beraisa): One who is drunk may rule that a Sheretz is Tamei and that a frog is Tahor.
Suggestion: It is like R. Yosi b'Rebbi Yehudah. It is unlike Chachamim.
Answer: No, even Chachamim permit this, for anyone who knows Chumash knows this.
(Rav): The Halachah follows R. Yosi b'Rebbi Yehudah.
Question: But Rav wouldn't expound on Yom Tov until the next day (and R. Yosi forbids only Hora'ah)!
Answer: Rav would give Hora'ah when he expounded.
Question: Why didn't he expound without giving Hora'ah?
Answer: He could not avoid it.
Rishonim
Rambam (Hilchos Bi'as Makdish 1:3): Just like a drunk Kohen may not enter the Mikdash, one who drank may not give Hora'ah - "(Yayin v'Shechar Al Tesht...) u'Lehoros". However, he may rule about something so explicit in the Torah that even Tzedukim (who deny the oral tradition) know it, e.g. that blood is forbidden.
Rambam (4): Someone drunk may teach Torah, even Halachos and Medrashos, as long as he does not give Hora'ah. A Chacham who regularly gives Hora'ah may not teach, for his teaching is Hora'ah.
Kesef Mishneh: This is how the Rambam explains the case of Rav (Kerisus 13b; we learn Halachos from whatever Rav taught), unlike Rashi's Perush (people would always ask questions, and Rav could not avoid answering).
Ri Korkus: Perhaps the Rambam means like Rashi.
Rosh (Eruvin 6:5): One who drinks a Revi'is of wine may not give Hora'ah.
Tosfos (Sanhedrin 42a DH ha'Oskim): "Ul'Roznim..." discusses capital cases. Judges engaging in monetary cases may drink. The Isur Hora'ah for someone drunk (Kesuvos 10b) applies to Isur v'Heter.
Poskim
Rema (YD 242:13): One must be careful not to give Hora'ah after drinking wine or other intoxicants. This applies even to a simple matter, unless it is clear in the Poskim and everyone knows it.
Taz (3, citing Terumas ha'Deshen 42): One may rule in front of his Rebbi about something clear in the Poskim. One who is drunk may rule only if it is clear from Chumash.
Shach (21): The Rambam and Terumas ha'Deshen permit a matter only if it is explicit in the Chumash and even Tzedukim agree to it. The Darchei Moshe (6) learns from the Maharik (169), but it is not clear why he is lenient against the Rambam and Terumas ha'Deshen. Even the Maharik did not clearly permit this. Perhaps the text of the Rema should say 'unless it is clear in the Pesukim.'
Aruch ha'Shulchan (33): We permit something explicit in the Torah because a person would not err about it. The same applies to something explicit in the Poskim! The Gemara discussed Tum'ah of a Sheretz because at the time there was nothing explicit in the Poskim. There is an argument even about Nosen Ta'am li'Fgam (detrimental absorptions)! The Rambam cited the words of the Gemara. Also, in his days the term 'Poskim' was not commonly used. If something is obvious, the Gemara says (about one who errs about it) he should go (back) to learn from his Rebbi.' Nowadays, the same applies to what is explicit in the Poskim!
Pischei Teshuvah (6): Ba'al ha'Itur permits judging monetary cases, but the Bach (Teshuvah 41) does not distinguish. One who is stringent will be blessed.
Shulchan Aruch (CM 7:5): Some permit a drunk judge to judge monetary cases.
Gra (15): This is like Tosfos (Sanhedrin 42a).
Pischei Teshuvah (6): The Medrash Rabah (Nasa 10:4) explicitly says that the Isur applies to monetary cases and Isur v'Heter. Tosfos must infer from 'Al Yoreh' that our Gemara forbids only Isur v'Heter. R. Yonah forbids both of them.
Tumim (6): Keneses ha'Gedolah says that our Gemara argues with the Medrash. It does not seem that Tosfos' proof suffices to say so. Perhaps one who judges capital cases may not drink even at night (after deliberation and before the final verdict the next day), because we want him to be seeking reasons for acquittal. If the final verdict of a monetary case will not be given until the next day, one may drink at night. This is no proof that one may judge while drunk. Tosfos is lenient about monetary cases because normally there are two others judges. If they see that the other's mind is not clear, they will tell him to wait until his mind clears.
Aruch ha'Shulchan (5): Even when one of the three drank, the primary opinion forbids. One should be stringent, for it is a Safek mid'Oraisa