K-r-e-v-y-e-t-k-a
Taking it out of its context and posting it like this makes it easy for a troll to say that the bible supports infanticide. Within context, it's clear that the psalm isn't speaking on God's behalf but on the behalf of the nation of Israel (specifically people in Jerusalem) of that time period, right after a horrible battle. The purpose of it is different when you include the context. It stops sounding like a proverb (since there was no citation), and it becomes clear that it's a prayer made out of anger and grieving by just normal people.
Easy?
With even more context, it's referring to not Israel, but the Kingdom of Judah during Babylonian's Siege of Jerusalem that ended in its eventual 587 BCE sacking. The nation of Israel, or the Northern Kingdom of Israel, had been been defunct for about two centuries that point.
Regardless I don't think that Judah is exactly guiltless. Judah conducted military campaigns in its four century history too. And after all, as Judah adopted Yahweh as it's dynastic cult, its rulers like King Josiah violently purged both non-believers -- largely political enemies of the ruling family -- from the kingdom. Including, I would bet, worshipers of the Assyrian gods. That it was invaded by the expanding Neo-Assyrian Empire? Hardly earth-shattering in a historical context.
But hey, maybe I'm being a poo-poo troll by pointing out how flipping silly it is to take solace in the cult writings of an Iron-aged culture that believed a magic god was following their every battle.
Raven Winter
"Happy shall he be that taketh and dasheth thy little ones against the stones."