And when Saul saw David going out to meet the Philistine, he said, etc., "Whose son is this youth?" (I Samuel 17:55). But did he not recognize him? For only yesterday he had sent and said to Jesse, "Let David, I pray, stand before me, for he has found favor in my eyes" (ibid. 16:22), yet here he asks about him! Rather, since he saw the head of the Philistine in his hand, he said to Abner son of Ner, "Go out and examine from which family he comes. If he is from Perez, he is a king; and if he is from Zerah, he is a judge." And Doeg the Edomite was there. He said, "Even if he is from Perez, he is unfit — is he not the son of Ruth the Moabite?" Abner said to him, "Has not the law already been newly established: an Ammonite but not an Ammonitess, a Moabite but not a Moabitess?" He said to him, "If so, then an Egyptian but not an Egyptian woman, an Edomite but not an Edomite woman." He said to him, "These peoples — why were they distanced? Was it not over the matter that they did not greet you with bread and water? They should have brought out the women [to meet the women]." The law was hidden from Abner for the moment. Saul said to Abner, "The law that has been hidden from you — go out and learn it from Samuel and his court." When he came to Samuel, he said to him, "This [is] from you, not from Doeg's teaching. Doeg is from me, and he shall not depart from the world in peace. To send you away empty-handed is impossible, [as it is written], 'All glory of the king's daughter is within' (Psalms 45:14) — this teaches that it is for the man to come forth and not for the woman; and 'because he hired against you Balaam son of Beor' (Deuteronomy 23:5) — this teaches that it is for the man to give the hire, but not for the woman."
Saul Questions David's Lineage and Abner's Forgotten Law
Midrash Shmuel 22:1
וכראות שאול את דוד יוצא לקראת הפלשתי אמר וגו' בן מי זה הנער (שמואל א' י"ז נ"ה), וכי לא היה מכירו ואתמול הוא משלח ואומר לישי יעמוד נא [דוד] לפני כי מצא חן בעיני (שם ט"ז כ"ב), והכא הוא שואל עליו, אלא כיון שראה ראש הפלשתי בידו. אמר לאבנר בן נר צא ובדוק מאי זו משפחה הוא, אם מפרץ הוא מלך הוא, ואם מזרח הוא שופט הוא, והיה שם דואג האדומי, אמר אפילו מפרץ הוא פסול, לא בן רות המואביה הוא, אמר לו אבנר [ולא] כבר נתחדשה הלכה עמוני ולא עמונית מואבי ולא מואבית, אמר לו אם כן מצרי ולא מצרית. אדומי ולא אדומית, אמר לו האנשים הללו למה נתרחקו לא על דבר שלא קדמו אתכם בלחם ובמים. היה להם להוציא הנשים [לקראת נשים], נתעלמה הלכה מאבנר לשעה, אמר לו שאול לאבנר הלכה שנתעלמה ממך, צא ולמד משמואל ובית דינו, כיון שבא אצל שמואל, אמר ליה הדא (מינך) [מנה] לך לא משל דואג, דואג מיניי הוא, ואינו יוצא בשלום מן העולם, להוציאך חלק אי איפשר [דכתיב] כל כבודה בת מלך פנימה (תהלים מ"ה י"ד), הא לאיש לקדם ולא לאשה, ואשר שכר עליך את בלעם בן בעור (דברים כ"ג ה'), הא לאיש ליתן שכר אבל לא לאשה.