Here's a personal anecdote: I do not carry a gun. About a month ago, I was walking home from my office to my apartment, which is about 2 blocks away in an urban neighborhood, with bars and apartments. I have been doing this for decades, at all hours. This time it was between 2am and 3am, which is not uncommon for me. I encountered one burly white guy walking down the sidewalk toward me. He was wobbling, and he looked sullen. I did not speak to him, but I moved over toward the curb and raised my hand in a sort of wave of greeting, but I didn't smile. He took objection to that, said something I don't remember, and kind of half-punched, half-shoved me off the sidewalk and into the street. I weigh about 240 pounds (none of it muscle). It takes quite a bit to shove me. I was so startled I didn't do anything, and after one more dirty look, he just kept on going.
The thought that was uppermost in my mind, once I started thinking again, was that if I had a gun, I would NOT want to shoot him with a 22, a 25, a 32 Long, a 32 ACP, or a 380. Maybe not even a 38 Special. What I would have wanted was a 9mm Parabellum at a minimum, and a 40 S&W would have been better. He was solid, he was strong, he was mean, and he was drunk, at least to some extent. I thought a small gun would just piss him off without stopping him.
That is the only physical encounter I have ever had where I wanted a gun. I am in my 60's. I wanted a gun big enough to have a real effect, and I would have bet against my ability to make head shots.
Lots of people have far more personal experience than I do, and even more have read and thought more deeply about this subject than I have, so this does not mean a lot. It is just what I think. Against a fair number of the people likely to mess with you, you cannot rely on a gun as a deterrent. They are not in the state of mind to think things over.
Incidentally, if I ever get another 22 target pistol, I would like to get a P-17. I am glad to hear you like yours. I would especially like it if I could fit a red-dot sight on it, because my eyes are not so hot any more.
PS - I did not call the police about this. It did not seem significant enough, because I was in no real danger; the guy just let it go. All they would do is give him a ticket, if they could find him by the time they got there. I was not even bruised, just shook up. But it made me think.