That's a valid elaboration focused on a single specific instance.
It doesn't mean that "you suck at SQL" isn't also a valid critique. For example, while GIN/GIST indexes will help them solve this problem, what that person may need is to actually just learn a lot more about SQL overall (rather than just one specific trick). "You suck at SQL" isn't a thing that's valid (read: correct) to say to someone just because they don't know about a window function. It's a thing that is valid to say when a person repeatedly demonstrates fundamental misunderstandings of SQL on many occasions.
It's also useful information. I've been told that I suck at UI, repeatedly. I accept and internalize this fact. As a result, while I do sometimes think about customer experience, I very rarely push hard for a specific UI or worry too much about details. I'll suggest that maybe a UI is confusing and they should hallway test it and then afterwards do nothing but insist that we abide by the test results (whatever they were).
Based on the mood affiliation of your comment, it sounds like you dislike this sort of interaction. You prefer something with more "empathy" and less "tearing them to shreds". That's exactly what I'm talking about when I say culture matters. You'd probably hate being on my team and I'd probably hate being on yours, even if we are both highly competent devs.