A simple question you would think?? No so. The Recreational Craft Directive (RCD) and your average marine electrician do not agree.
The RCD state that the 12v negative and the 240v earth should be connected together onboard. (Remember the earth and neutral are already connected - by the electric company)
Your average electrician will be happy with the 240v and the 12v totally isolated from each other.
What they both agree on is that there should be a consumer unit on the boat with all circuits correctly protected by circuit breakers and residual current trips.
Shore power leads must be configures so that you cannot touch the pins. This means the fixed receptacle on the boat must be a male plug and the lead must be a trailing socket.
A galvanic isolator is a good idea if you have expensive stern gear, are plugged in a lot or live aboard.
Some boaters just use the camping extension leads.... a blue plug, a cable and a 4 way with breakers and earth leakage protection. Not the best solution, but just about acceptable from a safety point of view.
A can of worms to do "correctly" but try to stay safe!!!
I have been looking online and as you say, there is a lot of conflicting/confusing advice. However none was as succinct as your answer in stating the problem and solutions.
I don't want my strap-line below to change to the Buzz Lightyear's "To Infinity ...... and beyond!"