If you are dining, then place it on the far side of your plate.
If you are sitting at a table, but not dining, then place it approximately halfway between the dining position and the table edge.
If you are standing by the table, then I'd go with about 4"-6" from the table edge.
If you are standing by the table in a high traffic area, then I'd go with 6"-8".
If you notice someone nearby who is particularly animated when speaking, then I'd aim for the centre of the table.
This answer assumes the table in question is a dining table. Coffee tables are a whole different kettle of fish; and don't even get me started on side tables, bureaus and credenzas!
The distance that, if while holding the glass base, you would be comfortable pushing yourself up from your seat (ulnar side down), before breaking the upper part of the glass in order to stab at someone who doesn't share the same political views as you.
As a host or even as a guest, your goal is to not cause discomfort to your company. So don't put the glass so close to the edge that people start to worry about it
That is exactly why I asked the question. How far away from the edge is that tough? The question comes from a friend that sometimes places his glass with an overhang, something I personally find psychotic.
Then you know the answer. The answer what would make you comfortable. Your friend is psychotic with overhanging glasses.
It's difficult to give you an exact answer cuz it depends on the group of people. Some people don't care about overhanging glasses some people do.
At a restaurant where nobody's responsible for cleanup, the overhanging glass becomes less of your problem and more of an interesting thing. If you saw an overhanging glass on another table would you go over and correct it? No
If your friend is persistently doing this, and they won't take feedback, put a little lip around the edge of your table so the glass can't hang off the edge