Drinking on Purim
(כב) כַּיָּמִ֗ים אֲשֶׁר־נָ֨חוּ בָהֶ֤ם הַיְּהוּדִים֙ מֵא֣וֹיְבֵיהֶ֔ם וְהַחֹ֗דֶשׁ אֲשֶׁר֩ נֶהְפַּ֨ךְ לָהֶ֤ם מִיָּגוֹן֙ לְשִׂמְחָ֔ה וּמֵאֵ֖בֶל לְי֣וֹם ט֑וֹב לַעֲשׂ֣וֹת אוֹתָ֗ם יְמֵי֙ מִשְׁתֶּ֣ה וְשִׂמְחָ֔ה וּמִשְׁל֤וֹחַ מָנוֹת֙ אִ֣ישׁ לְרֵעֵ֔הוּ וּמַתָּנ֖וֹת לָֽאֶבְיוֹנִֽים׃
(22) the days wherein the Jews had rest from their enemies, and the month which was turned unto them from sorrow to gladness, and from mourning into a good day; that they should make them days of feasting and gladness, and of sending portions one to another, and gifts to the poor.
אמר רבא מיחייב איניש לבסומי בפוריא עד דלא ידע בין ארור המן לברוך מרדכי רבה ורבי זירא עבדו סעודת פורים בהדי הדדי איבסום קם רבה שחטיה לרבי זירא למחר בעי רחמי ואחייה לשנה אמר ליה ניתי מר ונעביד סעודת פורים בהדי הדדי אמר ליה לא בכל שעתא ושעתא מתרחיש ניסא
Raba said: A man is obligated to mellow oneself [get drunk] until he does not know the difference between 'cursed is Haman' and 'Blessed is Mordechai.' Raba and Rabi Zeira made a Seudat Purim together. They became mellowed and then Raba arose and slaughtered Rabi Zeira. The next day he prayed for [divine] mercy and he returned to life. The next year, he [Raba] said to him [Rabi Zeira] "Come and let us make a seudat purim together." He [Rabi Zeira] replied, "Not every single time does a miracle occur."

(ב) חייב אינש לבסומי בפוריא עד דלא ידע בין ארור המן לברוך מרדכי: הגה: וי"א דא"צ להשתכר כל כך אלא שישתה יותר מלימודו (כל בו) ויישן ומתוך שיישן אינו יודע בין ארור המן לברוך מרדכי (מהרי"ל) ואחד המרבה ואחד הממעיט ובלבד שיכוין לבו לשמים.

(2) One is obligated to be intoxicated on Purim to the point where he does not know [the difference] between "accursed is Haman" and "blessed is Mordechai". Rama: Some say it is not necessary to become drunk so much, but rather to drink more than he is used to (Kol Bo), and to fall asleep, and while he sleeps he does not know [the difference] between "accursed is Haman" and "blessed is Mordechai" (Maharil). [There is no difference] between one who has more and one who has less, as long as his heart is directed to heaven.

Be'ur Halacha, 695

עד דלא ידע וכו'. ... אין אנו מצוין להשתכר ולהפחית עצמינו מתוך השמחה שלא נצטוינו על שמחה של הוללות ושל שטות, אלא בשמחה של תענוג שיגיע מתוכה לאהבת השם יתברך והודאה על הנסים שעשה לנו.

"He will not be aware [of the difference]." We should not become drunk and demean ourselves by rejoicing. We are not commanded to rejoice for the sake of debauchery and stupidity, rather we should rejoice with a delight that leads us to love G-d and acknowledge the miracles wrought for us.