I look at it and handle in the following ways:
1. There has to be permanent death in a game or else, seemingly in contradiction, it just sucks tons of fun out of it. If there is no REAL risk of permanent death then the impact of most of the roleplaying just gets the legs cut right out from under it.
2. Resurrection magic is and always has been nothing more than an in-game solution to a meta-game issue. It exists in the game solely for intended use by PLAYER characters, not NPC's. However, because the in-game presence of such magic creates additional in-game issues that can be just as much of a fun sponge those issues need to be dealt with as well. This, however, is NOT something you find in the rules, nor even in advice to the DM.
3. Accordingly, any character in game who can obtain the spell can use it on fallen comrades. Like any other spell, if you can find it and afford it you can have it.
4. It will ALWAYS fail to work on NPC's. Well, okay, it's possible it might work in extremely rare cases, but IMC when a character dies you're then in whatever afterlife your PC believed he would find after death. Generally this means you're in something like paradise. Resurrection magic requires a WILLING return of the soul from the afterlife. It may be for entirely meta-game reasons, but the only souls who then willingly return from the afterlife are those of player characters, never NPC's.
5. This all has SIGNIFICANT roleplaying implications for player characters. NPC's WILL NEVER share the kind of attitudes toward death and resurrection that players seem to allow their characters to have. PC's won't necessarily be shunned for these bizzare attitudes, nor for the truly exceptional fact that they HAVE returned from the dead without being UNdead - but they will almost universally be treated DIFFERENTLY as a result. NPC's will always carry feelings of disquiet, even mild distrust of resurrected PC's. PC's who display openly cavalier attitudes about death will certainly be treated as somewhat mad.
6. Even with affordable and available resurrection magic there will always still be a chance of failure of that magic, and of course the normal, listed penalties for successful resurrection are enforced.
7. Even having said all that, I am still considering allowing a one-time "freebie" resurrection to low-level characters whose players are likely to have been unable to do anything about their death. If the magic can be obtained it would then carry standard penalties but would automatically work. Once a character reaches a certain level (4th? 5th? Not sure) or the one-time freebie has been used, then all bets are off.