I recently asked a question, where someone gave an incorrect, but extremely close answer.

I'd like to leave the correct answer, somewhere where other people can see, in case someone finds it later, so I edited the question to make a few character change in the code to correctly answer the question, and it was rejected.

In the future, is the correct action to create a new answer, copying mostly from an old answer, and accept that, rather than editing and accepting the mostly correct answer?

  • 2
    You could also comment on the wrong answer to try and get the answerer to change it
    – StephenTG
    Commented Aug 23, 2013 at 20:26
  • If it's a small change, your best bet is likely a comment. If it's a significant change (i.e. you couldn't explain it in a comment), likely a new answer that references the first.
    – Servy
    Commented Aug 23, 2013 at 20:27
  • I take it this is the suggested edit? Looks like Erwin has now applied it. Commented Aug 23, 2013 at 20:33
  • @MartinSmith Yes, that's the one. I wasn't so much interested in this particular case, but the right way to handle that situation in the future
    – JeffS
    Commented Aug 23, 2013 at 20:37
  • 3
    @MartinSmith the editors' actions baffles me. If the answer was incorrect in the first place, and then JeffS corrected it, why on earth would it be rejected as 'too trivial' ? I for one am very grateful when I can copy working code which I can tweak to meet the need. Consider this errant code: launchNukes = true; ... I sure hope JeffS would come along and edit it to: launchNukes = false; OK, maybe changing replacing 4 earth shattering characters with 5 live savers is trivial, but what really stumps me is that TWO editors then reject because the code is incorrect or an attempt to comment. Commented Aug 23, 2013 at 20:49
  • (... continued) Assuming the OP doesn't make the correction, isn't this the best thing to do: "[EDIT - code correction] // comment out, saying 'old code was' then put in fixed code uncommented-out ? Commented Aug 23, 2013 at 20:50
  • @HowardPautz - I agree with you. The problem in this case I suspect is that it was probably reviewed by people not qualified to judge its technical accuracy and they erred on the side of caution. If the OP had seen it before rejection or a different set of reviewers it might have been approved. I concur with the answer here that there is nothing wrong with edits that correct code in answers but there is a spectrum of opinion on this. Commented Aug 23, 2013 at 20:52
  • @MartinSmith seems like it would always be safe to the point of needing to be policy that we leave the old code stand, but commented out, adding in the correction. Many of us do this in our own code anyway, yes ? That way, if the correction was incorrect, there'd be a trail. RE unqualified editors. Dang, my code plays with nukes, sure hope my editor knows about the Big Red Button. (Sorry, I find it inexcusable that someone would edit a post when they know they don't know. Are we that understaffed here ?) Commented Aug 23, 2013 at 21:10
  • @HowardPautz - Preferably people would just skip reviews if they are not sure either way. Commented Aug 23, 2013 at 21:13
  • @MartinSmith and, I assume, let someone else qualified pick it up. If that is SOP, then "erring on the side of caution" is errant (at least in this particular instance.) This seems really weird to me - or perhaps the editors were overly zealous --- I personally didn't understand that code exactly, but I could see comparing the original with the correction that JeffS was correcting a syntactical or functional error. If I were editing (and I will some day :), I'd have erred on JeffS's behalf assuming he knew what he was doing. Commented Aug 23, 2013 at 21:23
  • 2
    @StephenTG Please do not recommend comments in such cases. This goes directly against the official guidelines regarding comments: “Comments are not recommended for (…) suggesting corrections that don't fundamentally change the meaning of the post; instead, make or suggest an edit”. Commented Aug 23, 2013 at 21:29
  • Did you edit the question or the answer?
    – user200500
    Commented Aug 23, 2013 at 22:14

1 Answer 1


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.

  • Glad to see that you've answered this and saved me the trouble! Commented Aug 24, 2013 at 6:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .