וַתֵּחָ֣שֶׁב ל֭וֹ לִצְדָקָ֑ה לְדֹ֥ר וָ֝דֹ֗ר עַד־עוֹלָֽם׃
And that was counted unto him for righteousness, Unto all generations for ever.
Read halakhic rulings (Jewish law) on Psalms 106:31 from the Mishneh Torah and classical halakhic sources, free online.