You did the right thing.
When an answer is wrong, there are three tools you can use. Each tool apply to different circumstances.
- If the answer is fundamentally flawed, downvote it. Preferably leave a comment to explain both to the poster and to people who will read the answer what is wrong with it.
If there is a minor flaw in the answer, and you know how to correct this flaw, then edit it. Editing is a core feature of Stack Exchange:
Editing is important for keeping questions and answers clear, relevant, and up-to-date. (…)
When should I edit posts?
Any time you see a post that needs improvement and are inclined to suggest an edit, you are welcome to do so. (…)
Common reasons for edits include: (…)
- To correct minor mistakes or add updates as the post ages
If there is a minor flaw in the answer, and you do not know how to correct it, then leave a comment explaining what you don't understand or what trouble you ran into when trying out the solution in the answer.
Comments are temporary "Post-It" notes left on a question or answer. (…)
You should submit a comment if you want to:
- Request clarification from the author;
- Leave constructive criticism that guides the author in improving the post; (…)
Comments are not recommended for any of the following:
- Suggesting corrections that don't fundamentally change the meaning of the post; instead, make or suggest an edit
To summarize: comments are for unresolved issues only. If you are capable of resolving the issue, as was the case here, edit the post.
(After the edit was rejected, you were absolutely correct to comment. Since the issue could not be resolved in the normal way, this was the proper way to make it known.)
There is one thing you could have done better: your edit summary “Switching to use array containment instead of ANY” may make perfect sense to someone who knows the subject well, but I (who knows next to nothing about SQL), for one, have no idea what it means. Suggested edit reviews are not differentiated by tags. For 95% of the suggested edits, it doesn't matter: they're only correcting spelling, grammar, formatting and other aspects that require no domain knowledge. So it is better to write edit summaries that can demonstrate to non-experts why the suggested edit is a good one. Ideally, reviewers should skip edits when they are not competent to review them, but it reduces friction if you provide reviewers a way to verify your edit: try to explain in a sentence why ANY doesn't work.
Unfortunately, some of the people who review suggested edits on Stack Overflow do not follow the official rules cited above. Stack Overflow has a serious problem with suggested edit reviews, both with reviewers accepting obviously incorrect edits and reviewers rejecting obviously correct edits. Please don't take it to heart and keep up the good work.