And you’d be quite within your rights to use the shotgun on a knifeman....as long as he’s not got his back to you...Shotguns make a lot of noise and frighten people when they are not expecting them. A shot to the sky can easily deter someone, safer to avoid that area than move towards it. Defence, not assault.
Faced with someone with a knife I would not hesitate to use anything I had to defend my family and myself. You don't have to kill to prevent injury.