What do you think a fix would consist of? The program is working according to the design goals that were set for it. In particular, the objective is to test whether the server is up --- and if it answers back with 'database "foo" does not exist', then yes it's up.
Remove the database option.
But at the same time, people might not wish to clutter their server log with failed-connection messages, so we provide the necessary options to make the test connection attempt a valid one.
Be thorough, or be really light.
These two do the exact same thing, but ncat can't generate a spurious log entry: